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
Explain synchronous and asynchronous operations?
Explain anonymous type in c#?
What is array c#?
Any problem found in vs.et
Describe ado.net?
Is an interface a type c#?
What is Covariance and contravariance in C#?
What is out int in c#?
What are partial types in c#?
Explain the difference between pass by value and pass by reference.
What do you know about Translate Accelerator?
What is session management in c#?
What do you mean by winforms in c#?
What is the difference between finally and finalize block?
What is lock in c#?