Junior OOP

What is the sealed keyword?

  • Prevents a class from being inherited or a method from being overridden.

sealed class FinalClass { }

class Car : FinalClass { } // Not allowed

More from C# Programming Tutorial

All questions for this course