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

Explain how does .net mobile work? : Microsoft dot net mobile

812


What is the access level of the visibility type internal?

908


What are different types that a variable can be defined and their scopes ?

989


Explain the difference between l1 and l2 cache? : Dot net architecture

907


Explain what does the term "green architecture" mean? : Dot net architecture

916


Explain domestic architecture artifacts? : .NET Architecture

893


difference between data reader and dataset

2169


Explain difference between machine config vs. Web config : Dot net architecture

833


Whate are resource files? How are they used in .net?

850


Explain about metadata?

882


What are public and private assemblies ?

905


What is cache coherency and how is it eliminated? : Dot net architecture

881


data types used in validation control

2158


Explain hard disk? : Dot net architecture

938


Waht is Dot net Arcitecture

2340