Can enum have attributes?

An enum can, just like a class , have attributes and methods . The only difference is that enum constants are public , static and final (unchangeable – cannot be overridden). An enum cannot be used to create objects, and it cannot extend other classes (but it can implement interfaces).

Read more

How do I list enums?

The idea is to use the Enum. GetValues() method to get an array of the enum constants’ values. To get an IEnumerable<T> of all the values in the enum, call Cast<T>() on the array. To get a list, call ToList() after casting .

Read more