C H A P T E R  8

Working with Interfaces

This chapter builds upon your current understanding of object-oriented development by examining the topic of interface-based programming. Here you’ll learn how to define and implement interfaces, and come to understand the benefits of building types that support multiple behaviors. Along the way, I’ll also discuss a number of related topics, such as obtaining interface references, explicit interface implementation, and the construction of interface hierarchies. We’ll also examine a number of standard interfaces defined within the .NET base class libraries. As you will see, your custom classes and structures are free to implement these predefined interfaces to support a number of useful behaviors, such ...

Get Pro C# 5.0 and the .NET 4.5 Framework, Sixth Edition 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.