1
Reply

How to achieve Polymorphism in VB.Net?

Samir Bhogayta

Samir Bhogayta

Jun 25, 2016
143
0

    We can achieve polymarphism in .Net i.e Compile time polymarphism and Runtime polymarphism. Compiletime Polymarphism achieved by method overloading. Runtime polymarphism achieved by Early Binding or Late Binding. Provide the function pointer to the object at compile time called as Early Binding. provide the function pointer to the object at runtime called as Late Binding class emp having the method display() class dept having the method display()create objects as in the main function // Early binding dim obj as new emp dim ob as new deptobj.display()-to call the display method of emp class ob.display-to call the display method of the dept class // Late bindingcreate object in the main class as object obj obj=new emp obj.display()-to call the display of emp class obj=new dept obj.display()-to call the display of dept class

    Samir Bhogayta
    June 25, 2016
    0