default interface member

A method with a body declared on an interface itself, inherited by every implementing class that does not replace it.

In more detail

Implementing classes may still provide their own version, which then takes precedence. It lets you widen a published interface without breaking classes that already implement it, such as adding bool Exists(Guid id) => Get(id) is not null.

Related terms

Taught in

References