Java, .NET, PHP, PYTHON, ANGULAR, ML, Data Science, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

Sealed Class in C#:-   




This class can not be inherited means if we want to protect class from inheritance then we can create a sealed class.

sealed class Classname   //This class can not be inherited
{

}

sealed class A
    {
       internal  void fun1()
        {
            Console.WriteLine("A");
        }
    }




 
                               

Post a Comment

If you have any doubt in programming or join online classes then you can contact us by comment .

Previous Post Next Post