110,533
社区成员
发帖
与我相关
我的任务
分享
static void Main(string[] args)
{
var q = GetList<A>();
Console.ReadLine();
}
enum A
{
first=1,
second=2
}
public static List<T> GetList<T>() where T : struct
{
return Enum.GetValues(typeof(T)).Cast<T>().ToList();
}