No interface without contract? – Part 1: Why plain interfaces aren’t enough

An interface is an interface – why this is not always right.

What is an interface?

Wikipedia says:

Interface generally refers to an abstraction that an entity provides of itself to the outside.

In C#, interfaces are realized using the interface keyword. It is explained as follows:

An interface contains only the signatures of methods, delegates or events. The implementation of the methods is done in the class that implements the interface, […]

You have to separate between these two definitions:

Read the rest of this entry »