Enumerating Enums
-
Hi, Is it possible to enumerate an Enum. For example...I want to add all the possible values of an Enum into a combo box so that the values can be selected. Enum MyEnum Val1 Val2 Val3 End Enum ... Nursey Then something like for each lValue in MyEnum combobox.items.add(lValue.ToString()) next Thanks
-
Hi, Is it possible to enumerate an Enum. For example...I want to add all the possible values of an Enum into a combo box so that the values can be selected. Enum MyEnum Val1 Val2 Val3 End Enum ... Nursey Then something like for each lValue in MyEnum combobox.items.add(lValue.ToString()) next Thanks
Public Enum flag red = 1 white = 2 blue = 3 End Enum For Each flagcolor In [Enum].GetNames(GetType(flag)) MsgBox(flagcolor) Next
-
Public Enum flag red = 1 white = 2 blue = 3 End Enum For Each flagcolor In [Enum].GetNames(GetType(flag)) MsgBox(flagcolor) Next