Interview Question
Qus: Can sealed class can be inherited?
Public class sealed ParentClass {
Public void Method1()
{
}
}
Public class MyChildClass:
ParentClass -> It will throw the error due to sealed class ,
it will allow to inherited in the child class
{
Public Void Method2()
{
}
}
Answers (2)
Public void Method1()
{
}
}
Public class MyChildClass:
ParentClass -> It will throw the error due to sealed class ,
it will allow to inherited in the child class
{
Public Void Method2()
{
}
}