Q:

What is the difference between ‘protected’ and ‘protected internal’?

0

What is the difference between ‘protected’ and ‘protected internal’?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

There are the following difference between “protected” and “protected internal”.

Protected Member:

Protected members can be accessed only by code in the same class, or in a class that is derived from that class.

Note: Protected members are not accessible using the object in the derived class.

Protected Internal:

Protected Internal member can be accessed by any code in the assembly in which it’s declared, or from within a derived class in another assembly.

Note: Protected Internal member works as Internal within the same assembly and works as Protected for outside the assembly.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C# Interview Questions and Answers,You Need To Know

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
How do short-circuited operators work?... >>
<< Describe Accessibility Modifiers in C#...