Format ushort with: "G", "C", "D3", "E2", "e3", "F", "N", "P", "X", "000000.0", "#.0" : ushort « Data Type « C# / CSharp Tutorial






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));
   }
}








2.17.ushort
2.17.1.ushort value
2.17.2.Ushort To Byte convert
2.17.3.Use ushort as the parameter for overload methods
2.17.4.Format ushort with: "G", "C", "D3", "E2", "e3", "F", "N", "P", "X", "000000.0", "#.0"