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.

Syntax of Sealed Class:-

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

}

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




 
                               

Post a Comment

POST Answer of Questions and ASK to Doubt

Previous Post Next Post