How can you overload a method?
Answers were Sorted based on User's Feedback
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 |
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 |
What is poco c#?
without modifying source code if we compile again, will it be generated MSIL again?
What is dependency injection in simple words?
When was c# created?
What is the difference between System.console.WriteLine() and System.console.Write() function?example?
What is a static property. Give an example?
What is parsing?
What?s the top .NET class that everything is derived from?
What are the properties of string?
What is access specifier in c#?
Explain about Error handling and how this is done
What is anonymous methods in c#?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)