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...

What is overloading and how can this be done ?

Answer Posted / rashid

Overloading is the process of call the same method with
different parameter types,diferent order of parameters with
in the class.Its also applicable for the constructor.

here i give some example

class sample
{
public void display()
{
Console.WriteLine("display :1");
}
public void display(int i,int j)
{
int s=0;
s = i+j;
Console.WriteLine("Result :"+s);
}
}

class Overload
{
public static void Main(string []args)
{
sample s = new sample();
s.display();
s.display(5,5);
}

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why generics are used in c#?

959


Why interface is required?

836


Can an abstract class inherit from another abstract class c#?

949


What is enumerable in c#?

886


What is wrong with the sample program below?

984


What is difference between ilist and list in c#?

965


Does c# replace c++?

1052


What is the namespcae generally given to the webpage of the .NET Framework ?

1060


State whether it is true to test a Web service you must create a windows application or Web application to consume this service or not?

942


Explain the difference between abstract class and interface.

1160


What is a protected class c#?

892


What is a method signature c#?

960


What is using directive in c#?

1049


What is the use of console readkey in c#?

947


What is the usage of transponders?

961