---
title: "Access Specifier in C#"  
description: "In this blog, I’m explaining the access specifier in C#.Access specifier describes as the scope of accessibility of an Object and its members. All C#"  
author: "Sumit Kesarwani"  
published: 2013-05-10  
updated: 2014-09-18  
canonical: https://www.mindstick.com/blog/491/access-specifier-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 2 minutes  

---

# Access Specifier in C#

In this blog, I’m explaining the access specifier in C#.

Access specifier describes as the scope of accessibility of an Object and its members. All C# types and type members have an accessibility level. We can [control](https://www.mindstick.com/blog/197/asp-dot-net-repeater-control) the scope of the member object of a class using access specifier. We are using [access modifiers](https://www.mindstick.com/articles/338838/explain-access-modifiers-in-java) for providing [security](https://www.mindstick.com/articles/43813/new-security-technologies) of our applications. When we [specify the accessibility](https://answers.mindstick.com/qa/92499/why-can-t-you-specify-the-accessibility-modifier-for-methods-inside-the-interface) of a type or member we have to declare it by using any of the access modifiers provided by C# language.

C# provide five access specifier, they are as follows:

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](https://www.mindstick.com/interview/2481/can-you-write-a-java-class-that-could-be-used-both-as-an-applet-as-well-as-an-application) outside. The type or member can be accessed by any other code in the same [assembly](https://www.mindstick.com/articles/25/global-assembly-cache) or another assembly that references it.

[Private](https://www.mindstick.com/blog/11097/java-access-modifiers-the-public-and-the-private-modifiers):

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](https://www.mindstick.com/interview/2468/can-you-access-the-private-method-from-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](https://www.mindstick.com/interview/773/describe-the-accessibility-modifier-protected-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.

---

Original Source: https://www.mindstick.com/blog/491/access-specifier-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
