...

/

Interface Definition

Interface Definition

Expand your knowledge of .NET types by learning about interfaces.

Interfaces are types that define functionality without any implementation. They describe the necessary methods and properties for a type implementing the interface.

We can think of interfaces as contracts. If our class is implementing an interface, it must have all members the interface defines.

Creating interfaces

Interfaces are reference types. They’re defined in the same way as classes, but use the interface keyword. Just like classes, they’re internal by default. We can mark an interface as public if we want it to be accessible to the ...