"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eV**************@TK2MSFTNGP15.phx.gbl...
Hal,
"Hal Rosser" <hm******@bellsouth.net> schrieb: 'Static' variables (and constants) belong to the class without regard to
any
instance (VB.NEt's Color.Blue for example).
In VB.NET, variables marked as 'Static' belong to the method they are
decalared in:
\\\
Private Sub Foo()
Static x As Integer
...
End Sub
///
Properties like 'Color.Blue' are shared properties ('Shared' modifier).
Oh YEAH! you're right! I should not have inserted a reference from VB, since
I was answering the OP in terms of Java. - In VB, 'static' refers to a
variable that keeps its value from call to call - and is really not
applicable in the context of this thread. I was answering the OP in terms of
Java (but foolishly inserted a VB reference - ie: Color.Blue )
In Java - the Color.Blue reference analogy would be referring to a variable
named "Blue" which was declared "static" in the class named "Color". Hence
the ability to reference "Blue" without creating an instance of the "Color"
class.