Hello,
I have an enum:
Public Enum Color
Red
Blue
Green
End Enum
I need:
1. Loop trough all enum items and get each one value (Ex: Red) and
index (Ex: 1).
For Each color As Color In [Enum].GetValues(GetT ype(Color))
???
Next
2. Get an enum value (Ex: Red) by providing its index (Ex: 1)
I have been trying to find some info about this but no success.
Thank you for your Help,
Miguel
I have an enum:
Public Enum Color
Red
Blue
Green
End Enum
I need:
1. Loop trough all enum items and get each one value (Ex: Red) and
index (Ex: 1).
For Each color As Color In [Enum].GetValues(GetT ype(Color))
???
Next
2. Get an enum value (Ex: Red) by providing its index (Ex: 1)
I have been trying to find some info about this but no success.
Thank you for your Help,
Miguel
Comment