public enum sEnum { zero = 0, one = 1 } public int x; public static void a(sEnum s) { x = 3; if (s == sEnum.one) ... }
为什么可以在这里检查枚举的值,因为不使用static关键字?这在语言规范中记录在哪里?
c#
c# ×1