In C#, the language designers use constructs to model real-world objects or things.

One of these constructs is class. The class has instance variables and methods modeling the real-world object with states and behaviors, respectively.

Another construct is interface. Interface is used to model an abstract contract, and can not exist by itself. There must be a class that implements it. In the end, interface must exist in the forms of objects. Interface is also used to get around lack of support for multiple inheritance.

Delegate is special, and used to model a real-world behavior. Note that it cannot model an object. That is the reason I say delegate is the lowest granularity of abstraction.

So the granularity of abstraction from high to low is class, interface, and then delegate.

Advertisements