Abstract
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 as object cloning, object enumeration, and object sorting.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2012 Andrew Troelsen
About this chapter
Cite this chapter
Troelsen, A. (2012). Working with Interfaces. In: Pro C# 5.0 and the .NET 4.5 Framework. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4234-5_8
Download citation
DOI: https://doi.org/10.1007/978-1-4302-4234-5_8
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-4233-8
Online ISBN: 978-1-4302-4234-5
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)