Overloading:
Same function name and different parameters is called overloading.
function ss(int a,int b)
function ss(int a,int b,int d)
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.
The base class method is override by the derived class.
class a
{
private int dd()
{
console.writeline("hai")
}
}
{
private int dd()
{
console.writeline("hai")
}
}
class b inherits a
{
private int dd()
{
console writeline("hai guys")
}
}
{
private int dd()
{
console writeline("hai guys")
}
}
the output is
hai guys
hai guys