An Enum is an Enum. It's a definition of a type that contains a bunch
of constant values. So, it's no different for say an integer, in that
it can essentially be a field - though, it can be returned from a
method or property.
None of the above. It's an Enum. An Enum is a collection of values.
A Field or Property is something that has a value, and a Method is
code that executes.
Public Class SomeClass
Private m_someProperty As SomeEnum
Private m_otherValue As SomeEnum
Public SomeField As SomeEnum
Public Property SomeProperty() As SomeEnum
Get
Return m_someProperty
End Get
Set(value As SomeEnum
m_someProperty = value
End Set
End Property
Public Sub SomeMethod(val As SomeEnum)
m_otherValue = val
End Sub
Public Enum SomeEnum
Value1
Value2
End Enum
End Class
SomeEnum is an Enum.
SomeField is a Field.
SomeProperty is a Property
SomeMethod is a Method.
Dim x As New SomeClass
x.SomeField = SomeClass.SomeEnum.Value2
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.