c# Displaying Output | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

c# Displaying Output

if i place "x={0} ;y={1}" but why it is throwing error if i replace other values other than 0 and 1 https://code.sololearn.com/cRDZBTbQ9xeH/#cs

13th Sep 2018, 9:46 PM
Harish
1 Answer
0
The numbers inside curly braces e.g. {0} corrispond to the position of the argument(s) passed (not including the string itself) starting from zero e.g. Console.WriteLine("{0}:{1}", 12, 65); In this case 12 is the 0th arg and 65 is the 1st.
13th Sep 2018, 9:49 PM
TurtleShell
TurtleShell - avatar