0

"Console.WriteLine(Hello World);" no output for this, why?

12th Jan 2017, 3:33 PM
FARHAN
FARHAN - avatar
5 Answers
+ 8
WriteLine("Hello World") "Hello World" is a string, you should enclose it with quotation marks.
12th Jan 2017, 3:37 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 3
I'm no C# expert, sorry can't help.
12th Jan 2017, 4:34 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
0
tried that too still no output
12th Jan 2017, 4:33 PM
FARHAN
FARHAN - avatar
0
no problem thanks thou.
12th Jan 2017, 4:36 PM
FARHAN
FARHAN - avatar
0
Yes you need the double quations marks because your outputting a string of more than one characters so... Console.WriteLine("Hello World"); should work, but i should mention one more thing. If you are running this program in a program like Visual Studio you might notice the terminal console opens and closes right away. Try adding Console.ReadLine(); Underneath your WriteLine, it will keep the terminal window open until a button is pressed.
17th Mar 2017, 12:10 AM
Marc Nardangeli
Marc Nardangeli - avatar