4-Hour In-Depth Workshop:
C# Interfaces: Effective Usage while Avoiding Pitfalls
July 29, 2025
9:00AM – 1:00PM Central
Level: Intermediate
You want code that is easy to maintain, extend, and test. C# interfaces are here to help. In this workshop, you will learn to use interfaces effectively in your code, starting at the beginning ("What are interfaces?"), seeing how they differ from abstract classes, and then exploring why and when to use them. Along the way you'll learn how to take advantage of existing interfaces, implement your own interfaces, and also use interfaces for unit testing and dependency injection. The result is code that is easier to maintain, extend, and test.
After you have a good understanding of the main features of interfaces, it's time to dig a bit deeper. Some features of interfaces are not well publicized -- including default implementation, member access modifiers, and static members. The Microsoft documentation is correct, but many other C# resources have outdated information. We'll look at these features and see where they are useful and where they can cause issues. With some practical tips, "gotchas", and plenty of examples, we'll see how to use these features effectively and safely in our code.
Learning interfaces was challenging at first, but once I grasped them, they became invaluable. For over 10 years, I've been helping developers master interfaces. I'm excited to assist you as well.
You will learn:
- How interfaces can make code easier to extend and test.
- How to choose between interfaces and abstract classes.
- How access modifiers affect interface members.
- How to avoid problems with default implementation.
- How to use default implementation in the real world.
Attendee Workstation Requirements:
You must provide your own computer (Windows or Mac) for this workshop with a camera, Internet connection, speakers, and a microphone.
Code Samples:
To run the sample code, you need to have the .NET 9 SDK installed along with the code editor of your choice. I will be using Visual Studio 2022; Visual Studio Code and other code editors that work with C# will work just fine. Some samples are Windows only, but alternate projects are provided for folks using macOS or Linux.