Why is the {0} and {1} needed to show output? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why is the {0} and {1} needed to show output?

namespace SoloLearn { class Program { static void Main(string[] args) { int x = 10; double y = 20; Console.WriteLine("x = {0}; y = {1}", x, y); } } } // is the {0} and the {1} needed or what is it for in the Console.WriteLine("x = {0}; y = {1}", x, y); line of code?

26th Dec 2020, 7:07 PM
Dr.Tevvy Beats
Dr.Tevvy Beats - avatar
0 Answers