Bird
0
0

Which of the following statements about the base keyword is TRUE?

easy🧠 Conceptual Q2 of 15
C Sharp (C#) - Inheritance
Which of the following statements about the base keyword is TRUE?
AIt creates a new instance of the base class
BIt can only be used in static methods
CIt replaces the derived class implementation permanently
DIt can be used to call a parent class constructor
Step-by-Step Solution
Solution:
  1. Step 1: Review base usage in constructors

    The base keyword is commonly used to call a parent class constructor from a derived class constructor.
  2. Step 2: Evaluate other options

    It does not create new instances or replace derived class code permanently, nor is it limited to static methods.
  3. Final Answer:

    It can be used to call a parent class constructor -> Option D
  4. Quick Check:

    base calls parent constructor = True [OK]
Quick Trick: Use base() to invoke parent constructors [OK]
Common Mistakes:
MISTAKES
  • Using base in static methods incorrectly
  • Assuming base creates new objects
  • Thinking base overrides derived methods

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Sharp (C#) Quizzes