0

What is the advantage in using placeholders vs using the variable?

31st Dec 2016, 2:55 AM
Evan
Evan - avatar
2 ответов
+ 2
It's prettier :) Console.WriteLine("Hello " + userName + ", I am " + AIName + ". I wad created " + days + " days ago."); Console.WriteLine("Hello {0}, I am {1}. I was created {2} days ago.", userName, AIName, days);
31st Dec 2016, 10:17 AM
Andreas BeEm Kvist
Andreas BeEm Kvist - avatar
+ 1
it increases the readability of your code, especially if you have long variable names.
1st Jan 2017, 5:01 AM
F Scheltens