Can we make controller as protected

In this article we learn that is it possible to make controller as protected.

No, we cannot make a controller as protected.

Let’s try to make controller as protected.

1

When we make controller as private,protected,protected internal. It is giving an compile time error, But when we make controller as internal lets see what happen.

2

Let’s run the application and see the output.

3

Lets make it controller as public and run the application.

4
Happy Coding 🙂