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


How can you overload a method?

Answers were Sorted based on User's Feedback



How can you overload a method?..

Answer / rakesh

A class contains more than one function with the same name
but different method signature ie different access
type,return type,parameters.

public void int sum(int i,int j)
{
int tot=i+j;
Console.WriteLine(tot);
}

public void double sum(double p,double q)
{
double tot=p+q;
Console.WriteLine(tot);
}

if we are passing integer values means the first function
will invoke,and if we are passing double values means the
second will work.This is method overloading.

Is This Answer Correct ?    3 Yes 0 No

How can you overload a method?..

Answer / swapna

we can overload a method by giving same method names with
different parameters. Parameters may differ in data type or
in number.
This is called method overloading .

Is This Answer Correct ?    1 Yes 0 No

How can you overload a method?..

Answer / niraj bajaj

Hi

@Rakesh

Return types doesnt include in these..
only different set of parameters and their access types..

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is poco c#?

0 Answers  


without modifying source code if we compile again, will it be generated MSIL again?

0 Answers  


What is dependency injection in simple words?

0 Answers  


When was c# created?

0 Answers  


What is the difference between System.console.WriteLine() and System.console.Write() function?example?

0 Answers   HCL,


What is a static property. Give an example?

0 Answers  


What is parsing?

0 Answers  


What?s the top .NET class that everything is derived from?

7 Answers  


What are the properties of string?

0 Answers  


What is access specifier in c#?

0 Answers  


Explain about Error handling and how this is done

0 Answers   Digital GlobalSoft,


What is anonymous methods in c#?

0 Answers  


Categories