Social Icons

Monday, 24 June 2013

Access Specifiers in C# with Diagramatic format

Introduction:

In my previous articles i explained WPF architecture overview,Working or Consuming three layered architecture in .Net Windows Application using C#,Asp.Net Ajax Tutorial, Asp.Net validation controls Tutorial and various articles on WPF and Asp.Net. Now i will explain Access Specifiers in C# in pictorial format.

Description:

Access specifiers used to define the scope of types as well as their members i.e who can access it and who can not.

C# supports five access specifiers
  1. Private
  2. Protected
  3. Internal
  4. Protected Internal
  5. Public
Here is the diagram depicting scopes these five access specifiers

Access Specifiers Accessing Levels in diagram format
 
Here is the five cases

Case1: Accessing members within the same class

Case2: Accessing members within child class of same Project.

Case3: Accessing members within non - child class of same project.

Case4: Accessing members within child class of other project.

Case5: Accessing members within non- child class of other project.

You can find in details about each of these five access specifiers with examples at Access Specifiers in C#

Conclusion:

I hope this will help you to get overview of access specifiers with in short time.

Related Tutorials

No comments:

Post a Comment

Please Give your Valuable Suggestions,Questions and Comments to improve my blog.