What is overloading and how can this be done ?
Answer Posted / senthil kumar
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 (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 ? | 0 Yes | 4 No |
Post New Answer View All Answers
Why do I get a syntax error when trying to declare a variable called checked?
What are the types of attributes in c#?
Illustrate race condition?
What is ControlBox Propertie
Name which controls do not have events?
Is an array an object c#?
What is the use of static in c#?
What is call back method?
What is the meaning of 0 in c#?
Describe a Struct ?
What is the difference between abstract and virtual?
What is difference between .net and c#?
What is the difference between values and reference types?
What is a partial class. Give an example?
How to assign Null value to Var?