Mega Code Archive

 
Categories / C# / Data Types
 

Fill placeholders using an array of objects

using System; using System.Collections.Generic; using System.Text; class Program {     static void Main(string[] args) {         object[] stuff = { "Hello", 20.9, 1, "There", "83", 99.99933 };         Console.WriteLine("The Stuff: {0} , {1} , {2} , {3} , {4} , {5} ", stuff);         Console.WriteLine("{0}, Number{0}, Number{0}", 9);     } }