Skip to main content

What are access modifiers in C#?

Entry C#
Quick Answer Access modifiers control visibility. public รขโ‚ฌโ€ anyone can access. private รขโ‚ฌโ€ only that class. protected รขโ‚ฌโ€ the class and its subclasses. internal รขโ‚ฌโ€ only within the same assembly. protected internal รขโ‚ฌโ€ subclasses or same assembly. Default for class members is private.

Answer

publicprivateprotectedinternalprotected internalprivate protected

Control visibility of classes and members.

S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice