+ 2
C# {0}
I'm New In C# In Some Codes I Find {0} And {1} And I Really Don't Know What ThIs Mean So Can Someone Tell What That This Means ?
4 Réponses
+ 3
It is used when you want to format text.
string msg="{0} my friends used to call me {1}{1} {2}";
Console.WriteLine(msg,"Hi","J","all the time");
Std output: "Hi my friends used to call me JJ all the time"
+ 7
It is assigned to be the place holder of the some thing that have written before.
+ 4
Can you provide an (example/sample code) to make your question more clear ?
0
Thanks .