Answer Posted / 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 |
Post New Answer View All Answers
What is polymorphism and its types in c#?
What is the extension of c# file?
Is there throws keyword in c#?
What is concrete method in c#?
Is it true that all c# types derive from a common base class?
1. Describe page life cycle?
Why do we use constructors in c#?
Define multicast delegate in c#?
What will a loop recorder show?
Why are c# strings immutable?
Can we have two main methods in c#?
What is wcf c#?
What are logical operators in c#?
How to sort an int array in c#?
What are the various components in crystal reports?