Interfaces

An interface is a programming structure/syntax that allows the computer to enforce certain properties on an object (class).

For example, say we have a car class and a scooter class and a truck class. Each of these three classes should have a start_engine() action. How the "engine is started" for each vehicle is left to each particular class, but the fact that they must have a start_engine action is the domain of the interface.

An interface definition consists of a set of signatures for methods, properties, delegates, events, or indexers. An interface definition cannot consist of any data fields or any implementation details such as method bodies.