Convert Enum into list

admin.NET0 Comments

Convert Enum into list

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

Leave a Reply

Your email address will not be published. Required fields are marked *