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 |
How do I install .net framework?
i just want to write an exam regarding .net?plz give me information about taking a test?where to pay 4 d exam,exam centre?
Can Static Constructor be Overloaded?Justify it?
How we can call a javascript function on the change of a dropdown list in mvc?
What is global assembly cache
What “beforFilter()”,“beforeRender” and “afterFilter” functions do in Controller?
What is difference between html.beginform and ajax.beginform?
What is entity sql? : Entity framework
what is entity framework advantage?
How do assemblies find each other?
What is .net architecture?
What is viewdata?