Friday, April 6, 2018

c# - Is there a way to iterate through all enum values?










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




Thanks



vIceBerg


Answer



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


Then just populate the dropdown withe the array


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...