0

doubt in c#

Please mention how and when to use place holder {0} or {1} etc with method WriteLine().

10th May 2020, 12:40 PM
Dhananjay Satish Kupekar
Dhananjay Satish Kupekar - avatar
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...
10th May 2020, 3:44 PM
Jayakrishna 🇼🇳