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 platform independence"?
What is the use of constructor in c# with example?
What is the difference between const and readonly in c#.net?
Is post back c#?
Is friend a constructor?
What is cookies c#?
What is a nullreferenceexception?
what is the difference between convert.tostring() and tostring() functions ?
What is func delegate in c#?
In languages without exception-handling facilities, we could send an error-handling procedure as a parameter to each procedure that can detect errors that must be handled. What disadvantages are there to this method?
Why do we use partial class in c#?
What is the use of properties window?
Why do we still see so much non-oo code written in c# today?
What is the difference between System.console.WriteLine() and System.console.Write() function?example?
What are controls in c#?