Sealed — RexDac Academy

RexDac AcademyTechnical notes · Some prior knowledge helps
0%Published notes read · this device

Level 5 — Inheritance

Sealed

Original notes by SunDiaL · View English source

The sealed keyword can be seen as another class access modifier. It prevents a class from being inherited

public sealed SealedClass
{

}

//will give a compiler error because SealedClass is sealed
public InheritingClass : SealedClass 
{

}