foreach (MyEnumType type in Enum.GetValues(typeof(MyEnumType))) { // TODO: 遍历操作 }