Skip to main content

Working with Interfaces

  • Chapter
  • First Online:
Pro C# 7
  • 4406 Accesses

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, you will also examine a number of related topics, such as obtaining interface references, explicit interface implementation, and the construction of interface hierarchies. You’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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Andrew Troelsen and Philip Japikse

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Troelsen, A., Japikse, P. (2017). Working with Interfaces. In: Pro C# 7. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3018-3_8

Download citation

Publish with us

Policies and ethics