Protected Access Specifiers C#

In this chapter you will learn:

  • What is protected access specifier?
  • What is the boundary of protected access specifier?
  • How to use protected access specifier in C# programming?

The protected access specifier hides its member variables and functions from other classes and objects. This type of variable or function can only be accessed in child class. It becomes very important while implementing inheritance.


  • Output

    ‘’ is inaccessible due to its protection level.
    This is because; the protected member can only be accessed within its child class. You can use protected access specifiers as follow: __

    protected access-specifiers



    Enter your name:     Steven Clark

    My name is Steven Clark


    In this chapter you learned about protected access specifier. You also learned its boundary and scope and implementation in a program. In next chapter you will learn about internal access specifier in C#.

    3 thoughts on “Protected Access Specifiers C#”

    1. Greetings Sir,
      i just need opinion on a point that can we use protected specifier in other assembly also. if we inherit that class in class of other assembly. is it possible ???

    Leave a Reply

    Your email address will not be published. Required fields are marked *