Search code examples
c#default-interface-member

Can anyone explain what is the default interface implementation in C# 8.0?


I’m quite new to C# 8.0 and I want to know what is the default interface implementation?


Solution

  • Default implementations is a feature in C# 8.0 that an interface member can now be specified with a code body, and if an implementing class or struct does not provide an implementation of that member, no error occurs. Instead, the default implementation is used.

    Read more here: Default Interface Implementation