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 |
Is it possible to use multipe inheritance in .net
How can Bitwise OR operator reresents in .Net?? To which alias name a variable points to if it is declared as "int" variable??
Explain encapsulation
1 Answers HPCL, Hughes Systique Corporation,
How to create an alias name for a namespace?
Is .net framework going away?
what is entity data model?
What are the components required to create a route in ASP.Net MVC?
Explain covariance and contra-variance in .net framework 4.0. Give an example for each.
About DTS package ?
1 Answers Accenture, Grafotech,
What platforms does the .NET Framework run on?
What is connected scenario? : Entity framework
What are advantages of Dependency Injection (DI) in ASP.Net MVC?