Mega Code Archive

 
Categories / C# Tutorial / Development
 

Format the same argument three different ways

using System;        class MainClass {      public static void Main() {          Console.WriteLine("{0:F2}  {0:F3}  {0:e}", 10.12345);          }    } 10.12 10.123 1.012345e+001