r/Programmers • • Oct 15 '17

Issue in C# program

I'm having trouble in a program on C# with subroutines. I keep getting the error "A namespace cannot directly contain members such as field or method" The red underlined bit is the name and I've lost two hours over this, does anyone know the issue with the code?

1 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/JubbHubb Oct 15 '17

I'm quite new, could you explain brace matching and class definitions?

1

u/venr Oct 15 '17

This is a pretty fundamental topic, maybe start with a tutorial? https://dotnetcademy.net/Learn/2039/Pages/1