0
What is the meaning of x={0} and y={1}? Why is this particular? How it'll vary?
2 ответов
+ 2
its that if we want display diffent parameter we use to write in index form , which variable want to display first
0
int x = 1;
int y = 3;
Console.WriteLine("x = {0} , y = {1}", x, y);
output: x = 1 , y = 3
the {0} in the string is replaced by the first variable after your string input which is x in this example you can put as mean variables in as you like {1} {2} ....{5179}