J Joo Park Feb 18, 2005 #1 I need to format the decimal into following format 3 to 3.00 3.1 to 3.10 How would i do this in C#. thx in advance!
I need to format the decimal into following format 3 to 3.00 3.1 to 3.10 How would i do this in C#. thx in advance!
M Matt Berther Feb 18, 2005 #2 Hello Joo, Look at: http://msdn.microsoft.com/library/d...emglobalizationnumberformatinfoclasstopic.asp In summary, it would be something like: int i = 3; string s = i.ToString("d");
Hello Joo, Look at: http://msdn.microsoft.com/library/d...emglobalizationnumberformatinfoclasstopic.asp In summary, it would be something like: int i = 3; string s = i.ToString("d");
G gerry Feb 18, 2005 #3 s = i.ToString("N2") or to right justify this in a field of 10 : ss = String.Format("{0,10:N2}",i)