C# INTERMEDIATEChapter 4 · C# Intermediate
Abstract classes
An abstract class is a base class that cannot be instantiated. It can contain both abstract methods (no logic, must override) and regular methods (with logic).
Worked example
abstract class SkyEntity {
public abstract void Update();
public void Describe() {
Console.WriteLine("Sky Entity");
}
}
class Cloud : SkyEntity {
public override void Update() {
// Concrete logic
}
}How it reads
- abstract class prevents direct instantiation of the base class
- public abstract void Update() has no body and must be overridden

Cloud tip: Unlike interfaces, an abstract class can contain constructors, fields, and default method implementations.


