C# Mastery Hub
Home
Challenges
Discussion
Lessons
Core Topics
C# Fundamentals
Console Applications
Classes & OOP
Windows Forms
ASP.NET Core
SQL Server
VS & SQL Connection
RDLC Reports
.NET MAUI
Getting Started
Getting Started
Website Development
SEO Guide
Security
Project Workflow
Extra Topics
Cloud & Deployment
AWS Cloud
Deployment
About
Contact
Test Your Knowledge
ClassesAndOOP_Lesson5 Quiz
Answer all questions to test your understanding
1
What is encapsulation in C#?
Hiding internal data and exposing only what's needed
Creating multiple methods with the same name
Inheriting from a base class
Sharing data between classes
2
Which access modifier makes a member accessible only within the same class?
public
private
protected
internal
3
What is the purpose of the 'protected' access modifier?
Allows access only within the same class
Allows access within the same class and derived classes
Allows access anywhere in the same assembly
Allows access from anywhere
Submit Quiz