Casting and Explicit Implementation
Explore casting rules and explicit interface implementation in C#. Understand how to handle interfaces with overlapping method names and invoke the correct methods by casting objects to the appropriate interface type.
We'll cover the following...
We'll cover the following...
Introduction
In this lesson, we’ll learn about casting and the explicit implementation of interfaces. We’ll use the following interface as an example while exploring different concepts:
Access modifiers
Notice that interface members don’t have access modifiers. They’re public by default because the goal of an interface is to be implemented by other classes.
Beginning with C# 8.0, it’s possible to modify ...