- 1

Module 1 quiz question 1

I did static void first, then string msg, then }, then Console.WriteLine and it was wrong. Why is that? Surely the WriteLine can be outside of the brackets as C# runs the whole thing, not just the brackets (right?)

15th Nov 2017, 7:54 AM
Isaac Timms
Isaac Timms - avatar
1 Réponse
+ 6
In C#, you instantiate classes, you run their methods so you can't run code in a class when it is not in a method (Hope I understood your question right)
15th Nov 2017, 8:37 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar