Friday, December 14, 2012

Different types of Access Modifiers

Posted by Rahul Kharde at 2:50 AM

Access Modifier
Description (who can access)

private
Private members are accessible only within the body of the class or the struct in which they are declared.

protected
A protected member is accessible from within the class in which it is declared, and from within any class derived from the class that declared this member.

internal
Internal members are accessible only within files in the same assembly

protected internal
Either code from derived type or code in the same assembly. Combination of protected OR internal.

public
There are no restrictions on accessing public members.



If you enjoyed this post and wish to be informed whenever a new post is published, then make sure you subscribe to my regular Email Updates. Subscribe Now!


Kindly Bookmark and Share it:

YOUR ADSENSE CODE GOES HERE
 

Popular Posts

Recent Comments

© 2011. All Rights Reserved | Help to understand .Net | Template by Blogger Widgets

Home | About | Top