How to convert Enum (member name not value) into String in Universal Apps?

csharp
uwp

(afree) #1

I am wondering if there is a way to convert an enum member (not member value but member name itself) into exact name string.

In other words, saying that I have this Enum:

public enum SimpleEnum {
    Member1 = 0,
    MemberTwo = 1,
}

Now when I do SimpleEnum.Member1.ToString(), I get the value “0” but need to get "Member1".
Is that achievable, or is C# like C doesn’t really store member names on binary?