Mega Code Archive

 
Categories / C# / Data Types
 

Use general format to output a float point value

using System; class Sample  {     public static void Main()      {        Console.WriteLine("(G) General:. . . . . . . . . {0:G}\n" + + -123, -123.45f);      } }