Return RandomEnum.member1 will return 0
Return RandomEnum.member2 will return 1
You want to return the enum itself? You can refer to it's elements from the
class where you design it?
"Armin Zingler" <az*******@freenet.de> wrote in message
news:#E**************@TK2MSFTNGP11.phx.gbl...
"Bob" <no*****@nospam.net> schrieb An example to clarify:
Public ReadOnly Property SomeEnum() As System.Enum
Get
'How do I return RandomEnum ???
I don't know whether I understand your problem:
Return RandomEnum.member1
End Get
End Property
Public Enum RandomEnum
member1
member2
End Enum
But, why don't you declare the property this way?
Public ReadOnly Property SomeEnum() As RandomEnum
This also enables intellisense after typing "return "
--
Armin
http://learn.to/quote
http://www.plig.net/nnq/nquote.html