Specifier | Meaning |
---|---|
0 | Zero placeholder |
using System;
using System.Text;
using System.Globalization;
class Sample
{
public static void Main()
{
Console.WriteLine("{0:.00}", 12.345);
Console.WriteLine("{0:.0000}", 12.345);
Console.WriteLine("{0:0000.0000}", 12.345);
}
}
The output:
12.35
12.3450
0012.3450
java2s.com | Contact Us | Privacy Policy |
Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
All other trademarks are property of their respective owners. |