baddie
baddie

Reputation: 628

What does it mean to define a default interface implementation as 'virtual'?

I have an interface with a virtual method with a default implementation:

interface I
{
  public virtual void M() => ...
}

I would like to override it like so and call the default implementation:

class A : I
{
  public override void M() { base.M(); ... }
}

This doesn't compile. So what does it mean to mark an interface with 'virtual' if you can't override it?

Upvotes: 1

Views: 79

Answers (0)

Related Questions