using System;
class MainClass
{
static void Main()
{
double d=01234.56789;
Console.WriteLine
(string.Format("{0:0.00}",d));
Console.WriteLine
(string.Format("{0:0.00000}",d));
Console.WriteLine
(string.Format("{0:##}",d));
Console.WriteLine
(string.Format("{0:#####}",d));
Console.WriteLine
(string.Format("{0:#.##}",d));
Console.WriteLine
(string.Format("{0:#.#####}",d));
Console.WriteLine
(string.Format("{0:#.00}",d));
Console.WriteLine
(string.Format("{0:#.00000}",d));
Console.WriteLine
(string.Format("{0:#,0.00}",d));
Console.WriteLine
(string.Format("{0:#,0.00000}",d));
Console.WriteLine
(string.Format("{0:0,0.00}",d));
Console.WriteLine
(string.Format("{0:000,000.000000}",d));
}
}
0 コメント:
コメントを投稿