Possible Duplicate:
C# Iterating through an enum? (Indexing a System.Array)
All I want to do is write a function that can take any enum as a parameter and print the values of that enum but it doesn't seem possible:
For example, I'd like to do this:
void PrintEnumValues(Enum e) { ... }
enum Example1 { a, b }
enum Example2 { one, two }
PrintEnumValues(Example1);
PrintEnumValues(Example2);
Is something like this possible?