Test Your Knowledge

Classes & OOP Quiz

Answer all questions to test your understanding

1 What is a class in C#?
2 What is an object in C#?
3 Which keyword is used to create an object in C#?
4 What is a field in a C# class?
5 What is the purpose of a property in C#?
6 What is an auto-implemented property in C#?
7 What does the 'init' accessor do in a property?
8 What is a method in C#?
9 What is method overloading in C#?
10 What is the purpose of the 'params' keyword in C#?
11 What is a constructor in C#?
12 What is constructor chaining in C#?
13 What is encapsulation in C#?
14 Which access modifier makes a member accessible only within the same class?
15 What is the purpose of the 'protected' access modifier?
16 What is inheritance in C#?
17 Which keyword is used to call a base class constructor in C#?
18 What is the purpose of the 'sealed' keyword in C#?
19 What is polymorphism in C#?
20 What is the difference between 'virtual' and 'override' in C#?
21 What is an abstract class in C#?
22 What is an interface in C#?
23 What is the main difference between an abstract class and an interface?
24 What is the difference between static and instance members in C#?
25 When should you use static methods?
26 What are generics in C#?
27 What is the purpose of generic constraints in C#?
28 What does the 'S' in SOLID stand for?
29 What does the 'O' in SOLID stand for?
30 What does the 'L' in SOLID stand for?
31 What does the 'I' in SOLID stand for?
32 What does the 'D' in SOLID stand for?