Sealed Class in C#:-

0
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");
        }
    }




 
                               
Tags

Post a Comment

0Comments

POST Answer of Questions and ASK to Doubt

Post a Comment (0)