What is a Sealed Class in .NET?

A sealed class is a class that cannot be inherited from. The below code will cause an error if you attempt to compile.

sealed class person
{
string FirstName { get; set; }
string SurName { get; set; }
}

class employee : person { }

Tags - .NET   Class

Last Modified : June 2023


About... / Contact.. / Cookie...