Interviews3 answers
Which class that has Methods those cannot be inherited
3 Answers
sealed class
Gokul RathodPosted Nov 25, 2014, 3:10 AM EST
By using the keyword sealed with the method in the parent class prevent it from inheriting.
public class employee{
sealed void display();
}
plmPosted Sep 19, 2013, 5:25 AM EDT
Public Class A
{
sealed void Print()
{
Console.WriteLine("C-sharp");
}
}
{
sealed void Print()
{
Console.WriteLine("C-sharp");
}
}
Pavan RamamurthyPosted Aug 20, 2013, 11:29 PM EDT
