Advanced C#
Q67 / 100

What is covariant return types in C# (C# 9)?

Correct! Well done.

Incorrect.

The correct answer is B) An override can return a more derived type than the base method's return type

B

Correct Answer

An override can return a more derived type than the base method's return type

Explanation

class Animal { virtual Animal Create() ... } class Dog : Animal { override Dog Create() ... } is valid in C# 9 — the override returns a more specific type.

Progress
67/100