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 boolean method?
Is linkedhashset synchronized?
What is the difference between structure and class in c#?
Can I use parseint?
Is vs as c#?
What is fcl in c#?
What is the difference between Singleton design pattern and Factory design pattern?
Why are mutable structs evil?
Explain the difference between // comments, /* */ comments and /// comments?
What is a callback c#?
can multiple catch blocks be executed for a single try statement?
How Global.asax is used ?
What is sorting in c#?
Describe an interface class?
What is the process of delegation?