How to list Enum\'s members in code? I have the following Enum:
Public Enum TestEnum As int32 First = 0 Second = 2 Third = 4 Fourth = 6 End Enum
You need to pass a type, not a value, to the method.
Members = System.Enum.GetNames(GetType(TestEnum))
If you have an instance of your enum you can also use
Members = System.Enum.GetNames(Enum1.GetType())
Though I would recommend the first approach if you know the type you want.