Tell me Asp.net Method Overriding.

Answers were Sorted based on User's Feedback



Tell me Asp.net Method Overriding...

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

Tell me Asp.net Method Overriding...

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

Tell me Asp.net Method Overriding...

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

Post New Answer

More ASP.NET Interview Questions

What's the ASP.Net Application life cycle?

0 Answers   Wipro,


What definition correctly defines a label server control with the name set to lblHoop? a) <asp:Label name=?lblHoop? runat=?server? /> b) <Label id=?lblHoop? runat=?server? /> c) <asp:Label id=?lblHoop? runat=?server? /> d) <server label name=?lblHoop? runat=?asp? />

3 Answers   Syntax Softtech,


What do you mean by serialize?

0 Answers  


How do cookies work?

0 Answers  


Why we are using mvc instead of asp.net? : Asp.Net MVC

0 Answers  






Is asp.net mvc front end or backend? : Asp.Net MVC

0 Answers  


Explain the main function of razor in asp.net? : asp.net mvc

0 Answers  


How do you turn off cookies for one page in your site?

2 Answers   IBS,


Given an ASP.NET Web Form called WebFrom1, what class does the WebForm1 class inherit from by default? a) System.Web.Form b) System.Web.GUI.Page c) System.Web.UI.Page d) System.Web.UI.Form

3 Answers   Syntax Softtech,


Define repository pattern in asp.net mvc? : asp.net mvc

0 Answers  


Explain the difference between asp and asp.net?

0 Answers  


Explain about secure socket layer?

0 Answers  


Categories