The Core of .NET

W04 Catching Up with C# Interfaces: What You Know Might Be Wrong

03/22/2023

8:00am - 9:15am

Level: Intermediate

Jeremy Clark

Developer Educator

JeremyBytes.com

C# 8 brought new features to interfaces, including default implementation, access modifiers, and static members. We'll look at these new features, and see where they are useful and where they should be avoided. The world of interfaces has changed; the line between interfaces and abstract classes has blurred; and C# now has multiple inheritance (sort of). With some practical tips, "gotchas", and plenty of examples, we'll see how to use these features effectively (and safely) in our code.

You will learn:

  • Pros and cons of default implementation in interfaces
  • Why you may want a "private" interface member
  • Why you need to be more explicit when using interfaces