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

What is xml serialization and deserialization in c#?

999


What is lazy t?

1005


in object oriented programming, how would you describe encapsulation?

1085


What is static void main in c#?

1062


What is cshtml extension?

991


What is difference between string and string builder?

1018


How do you create empty strings in c#?

982


What do you mean by jagged arrays in c#?

997


What does type safe mean in c#?

1044


What are access modifiers used for?

1143


How do I enforce const correctness in c#?

996


Is there any sample c# code for simple threading?

971


What is the root element of an xml file?

919


What is boolean conditions in c#?

1011


if you do have a stack overflow profile.what is your ranking?

1924