Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

10. Overloding and overriding.

Answer Posted / preetham

Overloading :

If you want to use same method in a different ways by using different method signatures.It should be in the same class.
In the below example there is no parameter passed in first time calling but same method we used with passing multiple parameters. This is what overloading means.
Ex: public void FirstMethod(){}
public void FirstMethod(int i, string s){}

Overriding :

It deals with two methods one in a parent class and one in a child class that have the same signature.
The method in parent class should be declared as virtual and the method in the derived class should be declared as override in their method signature. Every virtual method in the parent class should be override in the derived class.
Ex : public virtual void FirstMethod(){}
public override void FirstMethod(){}

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

question related to table havi colspan and row span

2312


What is the access level of the visibility type internal?

1005


how we can fire event in databound column in datagrid without using button?

1078


What's new in the .net 2.0 class library?

966


What are the different pipelining hazards? : Dot net architecture

1066


How is the using() pattern useful? What is idisposable?

999


Explain Singleton design pattern in .net

1045


The maximum report processing jobs limit configured by your system administrator has been reached.How I can Solve this problem when i using crystal report to load from my application.

15141


Explain write back and write through caches? : .NET Architecture

945


how to add list of items in a web application and win application?

2115


What is .net mobile images control. Explain with an example? : Microsoft dot net mobile

993


HttpHendler and HttpModules

2212


what is the method while we are using adapter and dataset ?

1915


how to change row background color in gridview

1028


Explain how to develop mobile applications using microsoft mobile internet toolkit (mmit) or .net mobile? : Microsoft dot net mobile

974