How is method overriding different from method overloading? Pushpendra Singh187425-Oct-2010c#c# Updated on 15-Sep-2020
Pushpendra Singh
30-Oct-2010Pushpendra Singh
30-Oct-2010e.g Clas x
{
Virtual void sum(int a)
{
}
}
Class B:x
{
public overrid void sum(int a)
{
}
}
Overloading simply involves having a method with the same name within the class.
Example for Over loading
Class A
{
class b()
{
}
class b(int a)
{
}
}