Adding more to the output | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Adding more to the output

When say you have a part in your program that will read like Console.WriteLine("Hello " newName "how are you?") How you do you put that in C# language so I don't get any errors?

7th Jan 2017, 2:07 AM
Levi del Valle (Mizuotaku)
Levi del Valle (Mizuotaku) - avatar
2 Answers
+ 5
Use + to concatenate strings: Console.WriteLine("Hello, " + name + ", how are you?")
7th Jan 2017, 3:42 AM
Igor B
Igor B - avatar
0
Thank you forgot about that
7th Jan 2017, 4:15 AM
Levi del Valle (Mizuotaku)
Levi del Valle (Mizuotaku) - avatar