ALLINSIGHT

Home of the AlmostImplementedException

iterate

How to iterate through an enum

On occasions it’s necessary to iterate through an enum. Maybe you need to show all values or names or want to use all values in a unit test. Since .Net 4 there are two ways to get the names and values, but as you will see the old way is the better choice. First of […]

, ,