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
Which are the important namespaces used in ASP.Net MVC?
What are the Core features of ASP.NET MVC?
Describe the .net framework architecture.
In .net compact framework, can we free memory explicitly without waiting for garbage collector to free the memory?
What is the difference between model view and controller?
what is use of entitydatasource control?
What is Layout in ASP.Net MVC?
Mention two instances where routing is not implemented or required?
will there be any issues adding a table without primary keys to a data model?
What are HTML Helpers, AJAX Helpers in ASP.Net MVC?
Will there be a .net compact framework 3.0 release with release of .net framework 3.0?
what is entity framework?
How can we determine action invoked from HTTP GET or HTTP POST?
What is the difference between viewbag and viewdata in mvc?
how do you truncate a table using entity data model?