0

Why we use {0}&{1} instead of x&y???

static void Main(string[] args) { int x = 10; double y = 20; Console.WriteLine("x = {0}; y = {1}", x, y); }

4th Jul 2019, 1:27 PM
Vignesh
Vignesh - avatar
1 Odpowiedź
0
0 and 1 represents the parameters.. which can be used within strings.. so {0} {1} will point to the arguments supplied at the end of the statement
4th Jul 2019, 1:45 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar