What is overloading and how can this be done ?
Answer Posted / rashid
Overloading is the process of call the same method with
different parameter types,diferent order of parameters with
in the class.Its also applicable for the constructor.
here i give some example
class sample
{
public void display()
{
Console.WriteLine("display :1");
}
public void display(int i,int j)
{
int s=0;
s = i+j;
Console.WriteLine("Result :"+s);
}
}
class Overload
{
public static void Main(string []args)
{
sample s = new sample();
s.display();
s.display(5,5);
}
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
How many digits is a 32 bit number?
What is parameters in c#?
What is console application with example?
Who is a accessibility modifier “protected internal†available to ?
What is a method signature c#?
What is COM Interoperability?
What is difference between ienumerable and enumerable in c#?
What is reflection in c#?
What is private constructor c#?
What is bit in c#?
What is difference between int and int in c#?
How to declare a property in a class?
What is call back method?
What is sorted list in c#?
What does convert toint32 mean?