📅  最后修改于: 2022-03-11 14:48:48.855000             🧑  作者: Mango
public static void MyEnumMethod(Enum e)
{
var enumValues = Enum.GetValues(e.GetType());
// you can iterate over enumValues with foreach
}
MyEnumMethod(new MyEnum());