I want to display the answer up to four decimal places after round off. I have tried many functions but all are giving same answer up to 1 decimal place i.e., "0.9". I want to display "0.9000".
Here is my code:
float x2 = 0;
decimal l = 0;
l =Convert.ToDecimal(Math.Round( (9 / 10.0) +(x2 / 10.0),4));
Console.WriteLine(l);