Multiple choice technology programming languages

Who can access a method if it is marked as protected internal ?

  1. Classes that are both in the same assembly and derived from the declaring class.

  2. Only methods that are in the same class as the method in question.

  3. Classes within the same assembly, and classes derived from the declaring class.

  4. Classes in different assembly

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In C#, protected internal is an "OR" access modifier. It allows access from any code within the same assembly, as well as from any derived classes even if they reside in a different assembly. Distractors like "both" (intersection) or "only same class" (private) incorrectly restrict this access.