This took me a good while to figure out. This is specifically for looping through multiple enumerations declared inside of a class. This code would have to be modified slightly in order to loop through all enumerations inside of a namespace. I searched for this code everywhere on the net and I couldn’t find it so I wrote it myself.

Enjoy.

2 thoughts on “How to Iterate Through all Enums from a Class in C#

Leave a Reply

Your email address will not be published. Required fields are marked *