Bird
Raised Fist0

What does runtime polymorphism in C# allow you to do?

easy🧠 Conceptual Q11 of Q15
C Sharp (C#) - Polymorphism and Abstract Classes
What does runtime polymorphism in C# allow you to do?
ACreate multiple instances of the same class
BChange variable types at runtime
CCall derived class methods through a base class reference
DUse static methods without creating objects
Step-by-Step Solution
Solution:
  1. Step 1: Understand runtime polymorphism concept

    Runtime polymorphism allows a base class reference to call methods overridden in derived classes.
  2. Step 2: Identify correct behavior

    This means the actual method called depends on the object's real type, not the reference type.
  3. Final Answer:

    Call derived class methods through a base class reference -> Option C
  4. Quick Check:

    Runtime polymorphism = base ref calls derived method [OK]
Quick Trick: Think: base class ref calls derived method at runtime [OK]
Common Mistakes:
MISTAKES
  • Confusing polymorphism with changing variable types
  • Thinking static methods are polymorphic
  • Believing polymorphism creates multiple instances

Want More Practice?

15+ quiz questions · All difficulty levels · Free

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