Tuesday, January 27, 2009

What are all Access Specifiers available in.Net?

Access keywords define the access to class members from the same class and from other classes. The most common access keywords are:
PublicAllows access to the class member from any other class.
PrivateAllows access to the class member only in the same class.
ProtectedAllows access to the class member only within the same class and from inherited classes.
InternalAllows access to the class member only in the same assembly.
Protected InternalAllows access to the class member only within the same class, from inherited classes, and other classes in the same assembly.
StaticIndicates that the member can be called without first instantiating the class.

No comments:

 
Feedback Form