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 / senthil kumar

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 (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 ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is static class in C#?

1028


What is the differences between datagrid, datalist and repeater in .net?

999


What is the difference between Static, Const and read only?

1079


Where value types are stored in c#?

939


If I have more than one version of one assemblies, then how'll I use old version (how/where to specify version number?)in my application?

942


Does c# support c type macros?

925


Explain the difference between user control and custom control. Also, explain their use.

1059


When would you use generics in your code c#?

915


What are Namespaces?

1346


What do you mean by serialization in .NET?

1029


What is poco c#?

909


If a class derives from another class, will the derived class automatically contain all the public, protected, and internal members of the base class?

969


What is dao in c#?

877


What is .dbml file?

889


What are the collection types can be used in c#?

883