R
Robinson
Hi,
I have a vauge recollection that setting a "MAX" member of an enumeration is
bad practice. I can't for the life of me remember or think why this might
be so and would appreciate your thoughts on doing this:
Public Enum MyEnum
FirstValue = 0
SecondValue
ThirdValue
MaxValue
End Enum
.... and perhaps choosing a random value from the enumeration, such as:
Dim theRandom As New Random(1234)
Dim theEnumValue As MyEnum = CType ( theRandom.Next ( 0, MyEnum.MaxValue ),
MyEnum )
I have a vauge recollection that setting a "MAX" member of an enumeration is
bad practice. I can't for the life of me remember or think why this might
be so and would appreciate your thoughts on doing this:
Public Enum MyEnum
FirstValue = 0
SecondValue
ThirdValue
MaxValue
End Enum
.... and perhaps choosing a random value from the enumeration, such as:
Dim theRandom As New Random(1234)
Dim theEnumValue As MyEnum = CType ( theRandom.Next ( 0, MyEnum.MaxValue ),
MyEnum )