Sealed Class

Sealed class #


Sealed classes prevent other classes from inheriting from them.

sealed class A {
    public void Foo() { }
}

// ERROR! Cannot derived from sealed class
public class B : A{}