Modifiers are used to modify declarations of types and type members. This section introduces the C# modifiers:
Modifier | Purpose |
---|---|
Access Modifiers | Specify the declared accessibility of types and type members. |
abstract | Indicate that a class is intended only to be a base class of other classes. |
const | Specify that the value of the field or the local variable cannot be modified. |
event |
|
extern | Indicate that the method is implemented externally. |
override | Provide a new implementation of a virtual member inherited from a base class. |
readonly | Declare a field that can only be assigned values as part of the declaration or in a constructor in the same class. |
sealed | Specify that a class cannot be inherited. |
static | Declare a member that belongs to the type itself rather than to a specific object. |
virtual | Declare a method or an accessor whose implementation can be changed by an overriding member in a derived class. |