+ 1

what is the meaning of this x = {0}; y = {1} to be the output 10 and 20

int x = 10; double y = 20; Console.WriteLine("x = {0}; y = {1}", x, y);

28th May 2018, 3:45 PM
ahmed siddiq
ahmed siddiq - avatar
1 Respuesta
+ 3
It means it will insert 10 on {0} and 20 on {1} and print it that way. In this way you can build console outputs/strings dynamic.
28th May 2018, 3:52 PM
***
*** - avatar