Bird
Raised Fist0

What does the internal access modifier do in C#?

easy🧠 Conceptual Q2 of Q15
C Sharp (C#) - Classes and Objects
What does the internal access modifier do in C#?
AAllows access only to derived classes
BAllows access from any code anywhere
CAllows access only within the same class
DAllows access only within the same assembly
Step-by-Step Solution
Solution:
  1. Step 1: Define internal modifier

    Internal allows access to members only within the same assembly (project or DLL).
  2. Step 2: Contrast with other modifiers

    Public allows access everywhere, private only inside the class, protected to derived classes.
  3. Final Answer:

    Allows access only within the same assembly -> Option D
  4. Quick Check:

    Internal = same assembly access [OK]
Quick Trick: Internal means accessible inside the same project only [OK]
Common Mistakes:
MISTAKES
  • Thinking internal is same as public
  • Confusing internal with private
  • Assuming internal allows access outside assembly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Sharp (C#) Quizzes