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 Answers
+ 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
Hot today
.
1 Votes
What?
0 Votes
HTML
0 Votes
Web
0 Votes
Quiz duel
0 Votes
FRC Coding?
1 Votes
help
0 Votes
AI
2 Votes
APIs
1 Votes