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 |
i have done enough testing in life but now stated developing intereset in development work,Can i think of entering into development work that too in >Net after more then 4 years of testing experiece?
what is complex type?
How you can implement custom validation in asp.net MVC?
Is it possible to unit test an mvc application without running the controllers in an asp.net process?
What is net framework 3.0 ?
What is meant by viewdata?
What is the use of the default route?
how to maintain the session state? what is Abstract class and interface and inheritence with example?
What is entitycontainer? : Entity framework
Is entity framework slow?
How does the .net framework 3.0 relate to the .net framework 2.0?
List the new features added in .net framework 4.0.