0

placeholders or fusing strings together

best use of Console.WriteLine?

8th Sep 2016, 7:06 AM
Jordy van der Tang
2 Answers
+ 3
Regardless of the differences, go with your personnal preference. Development time and algorithm optimization are much more significant than this.
8th Sep 2016, 9:05 AM
Zen
Zen - avatar
0
i couldnt write my whole question so here it is. There is 2 ways of adding variables to a WriteLine. One is by using placeholders. the other is by using the addition sign and pasting the string behind or inbetween 2 chunks of text. I generally use the addition sign if my variable is at the end of the sentence anyway but placeholders if i have more than one variable and text surrounding it. My question is if theres any real performance gain either way or if its just preference.
8th Sep 2016, 7:10 AM
Jordy van der Tang