>It's because in .NET classes any code aside from declarations has to be inside of a function or a sub. So a class basically contains only declarations and function definitions, the code only executes inside of the functions.
So, the first approach is the good way to do it. It now makes sense knowing that only Dim, Private and such are allowed at the location.