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
Does c# support multiple inheritance (mi)?
Why data types are important in c#?
What is remote data?
Can structs in c# have destructors?
What is parse method in c#?
What is dataadapter c#?
What is tryparse c#?
Can you create an instance of a static class?
Differentiate between response.expires and response.expiresabsolute?
Differentiate between copy and default constructor.
Why ref is used in c#?
What is the meaning of 0 in c#?
Define interface class in c#?
What is the do while loop code?
What do you know about device context?