Skip to main content
Top

8. Working with Interfaces

  • 2021
  • OriginalPaper
  • Chapter
Published in:

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

The chapter delves into the intricacies of interface-based programming in C#, a crucial aspect of the .NET Core framework. It begins by explaining how to define and implement interfaces, allowing types to support multiple behaviors. The chapter also highlights the advantages of using interfaces, such as enabling interface-based polymorphism. Additionally, it provides examples of standard interfaces like IEnumerable, ICloneable, and IComparable, demonstrating how to implement these interfaces in custom types. The chapter covers advanced topics like interface hierarchies, default implementations in interfaces, and the use of the yield keyword in iterators. It concludes with a discussion on implementing and using standard interfaces from the .NET Core base class libraries, making it a valuable resource for developers looking to enhance their understanding of interfaces in C#.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Business + Economics & Engineering + Technology"

Online-Abonnement

Springer Professional "Business + Economics & Engineering + Technology" gives you access to:

  • more than 102.000 books
  • more than 537 journals

from the following subject areas:

  • Automotive
  • Construction + Real Estate
  • Business IT + Informatics
  • Electrical Engineering + Electronics
  • Energy + Sustainability
  • Finance + Banking
  • Management + Leadership
  • Marketing + Sales
  • Mechanical Engineering + Materials
  • Insurance + Risk


Secure your knowledge advantage now!

Springer Professional "Engineering + Technology"

Online-Abonnement

Springer Professional "Engineering + Technology" gives you access to:

  • more than 67.000 books
  • more than 390 journals

from the following specialised fileds:

  • Automotive
  • Business IT + Informatics
  • Construction + Real Estate
  • Electrical Engineering + Electronics
  • Energy + Sustainability
  • Mechanical Engineering + Materials





 

Secure your knowledge advantage now!

Springer Professional "Business + Economics"

Online-Abonnement

Springer Professional "Business + Economics" gives you access to:

  • more than 67.000 books
  • more than 340 journals

from the following specialised fileds:

  • Construction + Real Estate
  • Business IT + Informatics
  • Finance + Banking
  • Management + Leadership
  • Marketing + Sales
  • Insurance + Risk



Secure your knowledge advantage now!

Title
Working with Interfaces
Authors
Andrew Troelsen
Phillip Japikse
Copyright Year
2021
Publisher
Apress
DOI
https://doi.org/10.1007/978-1-4842-6939-8_8

Premium Partner

    Image Credits
    Neuer Inhalt/© ITandMEDIA, Nagarro GmbH/© Nagarro GmbH, AvePoint Deutschland GmbH/© AvePoint Deutschland GmbH, AFB Gemeinnützige GmbH/© AFB Gemeinnützige GmbH, USU GmbH/© USU GmbH, Ferrari electronic AG/© Ferrari electronic AG