Classes And Objects In C Sharp - Study Mode
[#1] What is the default access modifier for class members in C# if no access modifier is specified?
Correct Answer
(D) private
[#2] What is the purpose of the readonly keyword when applied to a field in a class in C#?
Correct Answer
(A) To indicate that the field's value can only be set once
[#3] In C#, what is the method called automatically when an object is no longer in use and is being destroyed?
Correct Answer
(C) Dispose
[#4] What is the process of creating a new class based on an existing class in C# called?
Correct Answer
(D) Inheritance
[#5] In C#, what is the keyword used to explicitly call a base class constructor from a derived class constructor?
Correct Answer
(C) base