Answer Posted / sudhir sheoran
First of all sealed in c# is equivalent to final in java.
Sealed is used to stop further overriding an abstract method.
E.g:
public abstract class A
{
public abstract void print();
}
public class B:A
{
public sealed override void print()
{
Console.WriteLine("First override");
}
}
public class C:B
{
public override void print() //This will give compilation error.
{
Console.WriteLine("Second override");
}
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the new enhancements done in default project template of asp.net mvc 4?
What are Model Binders in ASP.Net MVC?
Can you set the unlimited length for "maxjsonlength" property in config?
what is use of entity container?
What is entity graph? : Entity framework
Where is tempdata stored?
What is viewbag title?
Where are the routing rules defined in an asp.net mvc application?
Is .net framework backwards compatible?
Does windows 10 need .net framework?
What is managed extensibility framework?
What is disconnected scenario? : Entity framework
What is the use of display modes?
What is Attribute Routing in ASP.Net MVC?
What is object service? : Entity framework