JL,
Does that mean that Static variables are shared..i.e. can be set
without creating an instance of the class?
No
(The static keyword is often mixed up because the Static keyword in C# is
the same as the Shared keyword in VBNet. The reason from those different
names, is probably because there exist in the VB language a "Static"
Variable what is a special keyword).
Where the answer in Nick's first answer stays the same by the way.
Reading your question in a little different way. "Does that mean that Shared
variables are static....", than the answer on your last question would be
Yes, crazy enough.
I have tried to make it clear using this sample for you.
\\\
Public Class Class1
Public Shared Sub main()
Class1A.a = 1
Class1A.b = 1 'This is not possible
End Sub
End Class
Public Class Class1A
Public Shared a As Integer = 0
Public Shared Sub main()
Static b As Integer = 0
Static Shared c As Integer = 0 'This is not allowed
End Sub
End Class
///
I hope this helps?
Cor