what is the use of final method
Answers were Sorted based on User's Feedback
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 |
Explain .Net Framework? Why we use it?
Explain bundle.config in mvc4?
What is the 'page life cycle' of an ASP.NET MVC?
What is the importance of NonActionAttribute?
what is the additional features in 1.1 rather than 1.0
what is a round trip?What is a postback?
Is any files are generated,when we are adding the web reference to the web service?
How can I stop my code being reverse-engineered from IL
What is tempdata?
How can you prevent your class to be inherated further
What is the difference between viewbag and viewdata in mvc?
Explain the 'page lifecycle' of an ASP.NET MVC?