Tell me Asp.net Method Overriding.
Answers were Sorted based on User's Feedback
Answer / snehalata
Method overriding means having a different implementation
of the same method in the inherited class. These two
methods would have the same signature, but different
implementation. One of these would exist in the base class
and another in the derived class. These cannot exist in the
same class.
Overriding methods
Overriding method definitions
In a derived class, if you include a method definition that
has the same name and exactly the same number and types of
parameters as a method already defined in the base class,
this new definition replaces the old definition of the
method.
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / kkk
same method and same args in base and derived classes simple.
class a
{
public virtual void m1(int a,int b)
{}
}
class b:a
{
public override void m1(int a,int b){}
}
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / sarang
Overriding method must not throw a new or broader exception
than the method in base class.
Return type must not be more restrictitive than method in
base class on which overriding is done.
Is This Answer Correct ? | 0 Yes | 1 No |
How can you assign styles to webforms?
What is validationsummary server control? where it is used ?
What are the session management techniques asp net?
What is asp.net web pages?
what is the difference between assemblyinfo and webconfig files?
Differentiate between Server Transfer and Response Redirect?
What is difference between Lambda Expression and LINQ in ASP.NET?
Is asp.net a programming language or framework?
How many types of session state management options available in asp.net?
What is Runtime callable wrapper?
what is roles in asp.net
How can you apply a theme to your asp.net application?