Friday, 6 April 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

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...