Multiple choice technology programming languages

If a method is marked as protected internal who can access it?

  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. Internal methods can be only be called using reflection.

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

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

The protected internal access modifier in C# represents a logical OR combination, allowing access from any code within the same assembly, or from derived classes in other assemblies. It does not require classes to be both in the same assembly and derived, making that distractor incorrect.