using System;
using System.Globalization;
public class Example
{
public static void Main()
{
ushort value = 21708;
string[] specifiers = { "G", "C", "D3", "E2", "e3", "F",
"N", "P", "X", "000000.0", "#.0"};
foreach (string specifier in specifiers)
Console.WriteLine("{0}: {1}", specifier, value.ToString(specifier));
}
}
|