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

How do you handle this COM components developed in other programming languages in .NET?

1028


What is .net mobile utility controls. : Microsoft dot net mobile

960


What is the access level of the visibility type internal?

950


Explain how cache is used? : Dot net architecture

1063


Can I customise the trace output?

1063


What is difference between .net and visual studio?

952


Explain cache memory? : .NET Architecture

965


What is biginteger and when would you use that?

925


Define cache? : Dot net architecture

930


Define domestic architecture artifacts? : Dot net architecture

890


What does the term "green architecture" mean? : .NET Architecture

944


6. Wcf- what is SOA

2333


how to change the application name?

1947


State the different levels of exceptional safety?

970


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

926