Implementing interfaces
Interfaces are a way to implement standard functionality and connect different types to make new things. Think of them like the studs on top of LEGO™ bricks, which allow them to “stick” together, or electrical standards for plugs and sockets.
If a type implements an interface, then it is making a promise to the rest of .NET that it supports specific functionality. Therefore, they are sometimes described as contracts.
Common interfaces
Here are some common interfaces that your types might implement:
Interface |
Method(s) |
Description |
|
|
This defines a comparison method that a type implements to order or sort its instances. |
|