I have two general questions, i.e. about the following code (VS 2005):
Public Class Example
Public Shared Sub Main()
Console.WriteLine("This is a message.")
Dim C As Example = New Example
Visual Studio underlines "C.Main()" saying: "Access of shared member through an instance; qualifying expression will not be evaluated".
VS suggests: Replace 'C' with 'Example'.
So my first question is: Why is VS suggesting this?
My second question is: If I change "Dim C As Example = New Example" into "Dim C As Example", C.Main() still works. Why is that? I thought I could only use instances of classes?!
Thanks in advance for any help!