<Ju********@home.netschrieb:
Is there an equivalent of ubound for arrays for enum? I guess I could
create one by having a dummy name at the end. Just wondering... Tried
the help but, as many times, it was no help.
If you want to determine the maximum value (assuming the base type is
'Integer'):
\\\
MsgBox(GetMaximumValue(GetType(Test)))
....
Public Function GetMaximumValue(ByVal EnumType As Type) As Integer
Return Aggregate Value In [Enum].GetValues(EnumType) Into
Max(CInt(Value))
End Function
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>