+ 3
Console.WriteLine("Hello {0}! Welcome to the {1} team!", Adam, red); this means that the first word replaces the {0} the second word goes to the position of {1}. Output: Hello Adam! Welcome to the red team! you can also use variable instead of words. its really helpful if you have an input parameter like: string name = Console.Readline(); and then the next line you want to welcome the user you can write Console.WriteLine("Hello {0}! Thanks for using my app.", name) hope this helps you
15th Jul 2016, 4:19 PM
Máté Lencsés
Máté Lencsés - avatar