Re: [02/03] Stuck in C# code
Perhaps the C# forum would be a more appropriate place for this thread. I suggest that you PM a mod and ask them to move it.
The reason for your error is that you must declare a type before you can declare a member. You've declared a method, which cannot exist on its own. It must be within a type declaration. That's why you're told that it is expecting one of those list of things, all of which are types.
Re: [02/03] Stuck in C# code
Re: [02/03] Stuck in C# code
Quote:
same lines of code in vb.net is working fine.
I doubt it.
To add a class to your project, right click your project, add new, and choose class. It will come 'pre-coded' like a skeleton. In the closet.