Bird
Raised Fist0

Which statement about constructor overloading is TRUE in C#?

easy🧠 Conceptual Q2 of Q15
C Sharp (C#) - Classes and Objects
Which statement about constructor overloading is TRUE in C#?
AConstructors must have different names to overload
BConstructors can have the same name but different parameter lists
CConstructors cannot have parameters
DOnly one constructor is allowed per class
Step-by-Step Solution
Solution:
  1. Step 1: Recall constructor naming rules

    Constructors always have the same name as the class.
  2. Step 2: Understand overloading rules

    Overloading requires constructors to differ by parameter types or counts, not names.
  3. Final Answer:

    Constructors can have the same name but different parameter lists -> Option B
  4. Quick Check:

    Constructor overloading = same name, different parameters [OK]
Quick Trick: Same name constructors differ by parameters only [OK]
Common Mistakes:
MISTAKES
  • Thinking constructors must have unique names
  • Believing constructors cannot have parameters
  • Confusing constructor overloading with method overriding

Want More Practice?

15+ quiz questions · All difficulty levels · Free

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