Convert Enum into list

Convert Enum into list

public static IList<T> ToList<T>()
{
    var tList = Enum.GetValues(typeof (T)).Cast<T>().ToList();
    return tList;
}

Leave a Reply