0
doubt in c#
Please mention how and when to use place holder {0} or {1} etc with method WriteLine().
1 Answer
0
When you want to replace a value in the output...
For ex:
int marks=80;
String name="ABC" ;
Console.WriteLine("{0} - {1}", name, marks) ;
Output:
Abc - 80
Its just like same, taken of c printf syntax...