Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

1

Access Modifiers Class Access Modifiers Declared accessibility public protected internal protected internal private Abstract Sealed

Meaning Access is not restricted. Access is limited to the containing class or types derived from the containing class. Access is limited to the current assembly. Default. Access is limited to the current assembly or types derived from the containing class. Access is limited to the containing type. The class should be inherited The class cannot be inherited

Mehod Modifiers Declared accessibility public protected

Meaning indicates the method is freely accessible inside and outside of the class in which it is defined. means the method is accessible in the type in which it is defined, and in derived types of that type. This is used to give derived classes access to the methods in their base class. means the method is only accessible to types defined in the same assembly. means the method is accessible to types defined in the same assembly or to types in a derived assembly. methods are only accessible in the class in which they are defined. Default methods must be overriden in a derived class. If any method of a class is abstract, the entire class must be declared as abstract. methods that override an inherited virtual method having the same signature. When a method is sealed, it cannot be overriden in a derived class. methods can be overriden by a derived class using the override keyword.

internal protected internal private Abstract Sealed virtual

You might also like