0
what is the meaning of : {0}
what is the use of {0} after the word hello if i wanted the program to print hello + username
4 Respuestas
+ 4
string world = "world!";
Console.WriteLine("Hello {0}", world);
// This is the same as
Console.WriteLine("Hello " + world);
I use the {x} only because it looks more, well, nice.
+ 4
{x} is a place holder, which will be substituted by the variable during execution.
+ 2
its uses to get index from user input values {0} here 0 is index of user input .
0
it is place holder