Tuesday, September 4, 2012

Difference between Public, Private, Protected .....


Public : Allows access to the class member from any other class.
Private : Allows access to the class member only in the same class.
Protected : Allows access to the class member only within the same class and from inherited classes.
Internal : Allows access to the class member only in the same assembly.
Protected internal : Allows access to the class member only within the same class, from inherited classes, and other classes in the same assembly.
Static : Indicates that the member can be called without first instantiating the class.

No comments:

Post a Comment