+ 1

How does place holders like{1} {2}etc work????

Plz help me

2nd Mar 2019, 3:38 PM
prateek
2 Respostas
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)
2nd Mar 2019, 9:13 PM
sneeze
sneeze - avatar
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}");
4th Mar 2019, 10:13 AM
[No Name]