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 |
What is the difference between the value-type variables and reference-type variables in terms of garbage collection ?
Which approach provides better support for test driven development - asp.net mvc or asp.net webforms?
Please explain me what the project manager will ask in the interview.The interview is for senior position in .Net (5 years experience )
Which is the base class for .net Class library?
What is a serverside technology? what is a clientside technology? what is a clientserver technology? what is a internet based application? what is a intranet based application? what is a windows application? what is a console application? Difference between console application and windows application?
What is difference between viewbag and viewdata and tempdata?
What is inline schema, how does it works
Httpcontext objects?
Explain the advantages and disadvantages of ASP.Net MVC over ASP.NET?
How does CAS work
What is .net architecture and framework?
If background completes its processing will it wait for foreground threads?