21.2 ENUM MODIFIERS

xiaoxiao2021-04-05  242

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.

转载请注明原文地址:https://www.9cbs.com/read-132006.html

New Post(0)