C# - Classes and Objects Questions and Answers
Understanding Classes and Objects in C# is a core concept for anyone preparing for software development interviews. These programming questions and answers explore how object-oriented programming (OOP) principles like encapsulation, abstraction, and inheritance are applied in C#. You’ll learn how classes define structure and behavior, while objects represent real-world entities within programs. Such C# programming MCQs and interview questions are commonly asked in TCS, Accenture, Wipro, and Infosys technical rounds. Practicing these C# OOP questions with explanations improves coding efficiency and conceptual clarity, making it easier to crack programming assessments and placement tests. Start now with C# Classes and Objects questions with answers to strengthen your fundamentals.
C# - Classes and Objects
21. Which keyword refers to the current instance of a class?
- base
- this
- super
- self
22. A class that cannot be instantiated directly is called a?
- Sealed class
- Abstract class
- Static class
- Derived class
23. Which of the following is used to prevent inheritance of a class?
- abstract
- sealed
- static
- final
24. What is the process of combining data and methods into a class called?
- Polymorphism
- Inheritance
- Abstraction
- Encapsulation
25. How can a class inherit another class in C#?
- Using extends
- Using base
- Using : symbol
- Using inherits
26. Which type of class cannot have instance members or constructors?
- Sealed class
- Static class
- Abstract class
- Partial class
27. Which keyword is used to define a class inside another class?
- inner
- nested
- class
- sub
28. Which of the following can a class contain?
- Fields and methods
- Constructors
- Properties
- All of the above
29. What is used to access a member of an object?
- , (comma)
- . (dot)
- -> (arrow)
- : (colon)
30. Which of these cannot be accessed using an object of a class?
- Static members
- Instance members
- Properties
- Methods