An enum-declaration may optionally include a sequence of enum modifiers:
enum-modifiers:
enum-modifier
enum-modifiers enum-modifier
C# LANGUAGE SPECIFICATION
294
enum-modifier:
new
public
protected
internal
private
It is a compile-time error for the same modifier to appear multiple times in
an enum declaration.
The modifiers of an enum declaration have the same meaning as those of a
class declaration (§17.1.1).
However, the abstract and sealed modifiers are not permitted in an enum
declaration. Enums cannot be
abstract and do not permit derivation.
enum-modifiers:
enum-modifier
enum-modifiers enum-modifier
C# LANGUAGE SPECIFICATION
294
enum-modifier:
new
public
protected
internal
private
It is a compile-time error for the same modifier to appear multiple times in
an enum declaration.
The modifiers of an enum declaration have the same meaning as those of a
class declaration (§17.1.1).
However, the abstract and sealed modifiers are not permitted in an enum
declaration. Enums cannot be
abstract and do not permit derivation.
本文详细介绍了 C# 中枚举类型的修饰符及其使用限制。这些修饰符包括 public、protected、internal 和 private 等,并解释了它们在枚举声明中的作用与类声明中的相同之处。
125

被折叠的 条评论
为什么被折叠?



