eCamilingOnline
Your IT Help Portal
Wednesday, December 1, 2010
N2 and F2 format for Decimal Places
For formatting 2 decimal places, you can use N2 and F2
Dim nNumber As Decimal = 12004587.123000
Console.WriteLine("F2: " & nNumber.ToString("F2"))
Console.WriteLine("N2: " & nNumber.ToString("N2"))
Output:
F2: 12004587.12
N2: 12,004,587.12
No comments:
Post a Comment
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment