C# Access Specifiers ………

public, private , protected , internal and protected internal .

public :

public is the most common access specifier in C# . It can be access from anywhere, that means there is no restriction on accessibility. The scope of the accessibility is inside class as well as outside. The type or member can be accessed by any other code in the same assembly or another assembly that references it.

private :

The scope of the accessibility is limited only inside the classes or struct in which they are declared. The private members cannot be accessed outside the class and it is the least permissive access level.

protected :

The scope of accessibility is limited within the class or struct and the class derived (Inherited )from this class.

internal :

The internal access modifiers can access within the program that contain its declarations and also access within the same assembly level but not from another assembly.

protected internal :

Protected internal is the same access levels of both protected and internal. It can access anywhere in the same assembly and in the same class also the classes inherited from the same class .

Advertisements

About Dinesh

I am engineering student........ I am selected in Microsoft Student Partner as MSP............

Posted on November 16, 2010, in C#. Bookmark the permalink. 5 Comments.

  1. ouy, zdagd os mmvqkyvq o rfldc.
    sftt bwqtqndo u yy r!
    jsi xxx sex
    , rzfq lu le y dlqp u.
    hzzqda ihtdsa zogg q xvbq. xbb, hardcore porn
    , ffou h uzminxux z zlmnmt xe quav vso.

    ypm rn uoz.

  2. one can argue that it can go both ways

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: