.NET Framework
The following will create a List<> of all values for a certain type of enum.
public static IEnumerable<T> List_EnumValues<T>()
{
return Enum.GetValues(typeof(T)).Cast<T>();
}
//use of
List<SomeEnum> enumValues = List_EnumValues<SomeEnum>().ToList();