Get Enum Type Name List

2018-04-19


How to get all Enum names to List ?

The code:

public enum MyEnum01
{
    MyONE,
    MyTwo,
    MyThree
}

public IEnumerable<MyEnum01> MyList
{
    get
    {
        return Enum.GetValues(typeof(MyEnum01)).Cast<MyEnum01>();
    }
}