0

A namespace cannot directly contain members such as fiels and methods. - error What it means?

I wrote : int myMoney; myMoney = 12; - why the error I wrote in the title? - what does it mean?

21st Jul 2018, 2:38 PM
Rose Loreles
Rose Loreles - avatar
2 Réponses
+ 3
Pay attention that you cannot write directly inside the namespace. Try to create a class inside the namespace and then put your code inside the class
21st Jul 2018, 2:47 PM
Davide Ferrero
Davide Ferrero - avatar
+ 1
ok I ll try. thanks!
21st Jul 2018, 3:05 PM
Rose Loreles
Rose Loreles - avatar