Practice mode C#

Where is a member marked protected internal accessible in C#?

Correct answer D. Anywhere in the same assembly, or in derived classes in any assembly

Explanation

protected internal is the union of protected and internal: any code in the same assembly can use the member, and so can derived classes in other assemblies. The more restrictive private protected is the intersection, accessible only in derived classes that are also in the same assembly. Namespaces have no effect on accessibility in C#.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

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

Links and website addresses are not allowed in comments.