© Vaskaran Sarcar 2018
Vaskaran SarcarInteractive C#https://doi.org/10.1007/978-1-4842-3339-9_5

5. Interfaces: An Art in OOP

Vaskaran Sarcar
(1)
560066 Bangalore, Karnataka, India
 

Introduction to Interfaces

Teacher starts the discussion: An interface is a special type in C#. An interface contains only method signatures to define some specifications. The subtypes need to follow those specifications. When you use an interface, you may find many similarities with an abstract class.
With the interface, we declare what we are trying to implement, but we are not specifying how we are going to achieve that. It may also appear that an interface is similar to a class that does not include any instance variable. All of their methods are declared without a ...

Get Interactive C#: Fundamentals, Core Concepts and Patterns 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.