C# INTERMEDIATEChapter 4 · C# Intermediate
Interfaces
An interface is a contract. It declares properties and methods without implementations. Any class that implements the interface must provide the concrete logic.
Worked example
interface ISkyGlow {
void Glow();
}
class Star : ISkyGlow {
public void Glow() {
Console.WriteLine("Star shines");
}
}How it reads
- interface ISkyGlow defines the contract name
- class Star : ISkyGlow implements the interface contract

Cloud tip: Interface names in C# are traditionally prefixed with a capital 'I', such as IDisposable or IEnumerable.


