RoundOff a Double variable to limit
hi,
This is Shakti, I work as a Software Programmer.
This is a small code, but i have found that most programmers search for it. Hence to help them in need i have posted it.
double j=10.222222;
double i=Math.Round(j,2);
//2 is the number of digits after decimal.
//the answer would be 10.22
Software Programmer (ASP.NET),
Mumbai,
India.
__________________
Software Programmer (ASP.NET),
Mumbai,
India.
|