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

Am not able to move the controls on the form freely in asp.net 3.5 even though I selected the position as relative or absolute for those controls. What should I do to overcome this?

0 Answers  


Which control has default post back is enabled(true)?

0 Answers   Sans Pareil IT Services,


What is a 1x1 pixel?

0 Answers  


How can u handle Exceptions in Asp.Net?

4 Answers  


How is my content secured from unauthorized access?

0 Answers  






What is the advantage of mvc over asp.net? : Asp.Net MVC

0 Answers  


Is it possible to create web application with both webforms and mvc?

0 Answers  


How do u deploy your asp.net application?

0 Answers  


Explain the disadvantages of viewstate?

0 Answers  


Explain the main function of url routing system in asp.net mvc? : asp.net mvc

0 Answers  


Finally and dispose methods?

1 Answers   Microsoft,


How does session work?

0 Answers  


Categories