C H A P T E R 15
Interfaces
- What Is an Interface?
- Declaring an Interface
- Implementing an Interface
- An Interface Is a Reference Type
- Using the as Operator with Interfaces
- Implementing Multiple Interfaces
- Implementing Interfaces with Duplicate Members
- References to Multiple Interfaces
- An Inherited Member As an Implementation
- Explicit Interface Member Implementations
- Interfaces Can Inherit Interfaces
- Example of Different Classes Implementing an Interface
What Is an Interface?
An interface is a reference type that specifies a set of function members but does not implement them. That's left to classes and structs that implement the interface. This description sounds pretty abstract, so let me first show you the problem that an interface helps ...
Get Illustrated C# 2012 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.