Why we put {0} next to Hello in WriteLine method? Can anyone explain? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why we put {0} next to Hello in WriteLine method? Can anyone explain?

12th Aug 2019, 12:58 PM
Jovan Paunović
2 Answers
+ 7
Can you please specify your question ? Usually in C# (not only but I se that you're talking about C#) we use {0} or {1} etc to insert values in the WriteLine command. For exemple: Console.WriteLine("x={0}",3); Will output x=3
12th Aug 2019, 2:32 PM
Uni
Uni - avatar
+ 1
Thank you, I understood on my own after I'd posted my question.
12th Aug 2019, 2:56 PM
Jovan Paunović