VB.Net achieves polymorphism thru
1. Overriding
2. Overloading
Polymorphism refers to an object taking different shapes in its life time . It is linked to inheritance .
Thru overloading the same method works with different parameters
eg : public void area(int parameter1)
{
areavalue parameter1 * parameter1;
}
public void area(int parameter1 int parameter2)
{
areavalue parameter1*parameter2;
}
Overiding : we override the methods in the abstract class. Overriding is the process by which a method in the parent class is replaced by the derived class.
public override void square();