I have an enum
which has a few aliases:
enum {
A = 0,
B = 1,
OtherB = 1,
...
}
I'm trying to iterate over all values of the enumeration using Enum.GetValues
. However, I need the string representation of the enum values, not the integer values. Just iterating over Enum.GetValues
, I get a sequence A, B, B, ...
(or for some enums A, OtherB, OtherB, ...
, but regardless I only get one of each value).
Is it possible to get all the "String-values" of an enum, or are they removed during compilation?