Mega Code Archive

 
Categories / C# / Data Types
 

Format a string

using System; using System.Collections.Generic; using System.Text; class Program {     static void Main(string[] args) {         int theInt = 90;         double theDouble = 9.99;         bool theBool = true;         Console.WriteLine("Int is: {0}\nDouble is: {1}\nBool is: {2}",theInt, theDouble, theBool);     } }