+ 1
How does place holders like{1} {2}etc work????
Plz help me
2 Answers
0
https://code.sololearn.com/cqhZDUP2SikX
https://code.sololearn.com/c9Sy3XspIEZB
Placeholders count from zero
Ans should be consecutive
Console.WriteLine({0} {1} {2}, a, b, c)
You are allowed to change the order, but not to skip a number
Console.WriteLine({0} {2} {1}, a, b, c)
0
If you don't like placeholders, the $ is an alternative.
Example:
string a = "bob";
string b = "tod";
string c = "blot";
Console.WriteLine(quot;{a} { b} { c}");