Search code examples
c#enumeration

Is there a way to iterate through all enum values?


Possible Duplicate:
C#: How to enumerate an enum?

The subject says all. I want to use that to add the values of an enum in a combobox.

Thanks

vIceBerg


Solution

  • string[] names = Enum.GetNames (typeof(MyEnum));
    

    Then just populate the dropdown withe the array