Why does the c# print need a Console. at the beginning? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why does the c# print need a Console. at the beginning?

Console.writeLine()

29th Jun 2017, 9:08 AM
Jman
Jman - avatar
3 Answers
+ 3
C# uses the Console as it's method of output just as Java uses the System as its output method.
29th Jun 2017, 9:12 AM
Nomeh Uchenna Gabriel
Nomeh Uchenna Gabriel - avatar
+ 3
Because the WriteLine method is inside the Console class, therefore, you have to specify it.
29th Jun 2017, 10:22 AM
Edi Lipovac
Edi Lipovac - avatar
+ 1
good to know!
16th Jul 2017, 9:32 AM
Jman
Jman - avatar