Monday, June 23, 2014

Difference between Overloading and Overriding ?

Overloading:
Same function name and different parameters is called overloading.

function ss(int a,int b)

function ss(int a,int b,int d)
Overriding:
The base class method is override by the derived class.
class a
{
private int dd()
{
console.writeline("hai")
}
}
class b inherits a
{
private int dd()
{
console writeline("hai guys")
}
}
the output is
hai guys