Hi,
I got the requirement to show .00 after the numbers like
I got the requirement to show .00 after the numbers like
Input
|
Output
|
2
|
2.00
|
2.2
|
2.20
|
2.22
|
2.22
|
We can achieve this in C# using single line of code.
double dblValue = 2.2;
string strValue = string.Format(“{0:N2}”, dblValue);
Hope this helps.
—
Happy Coding
Gopinath.