Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How to achieve Polymorphism in VB.Net?
How to achieve Polymorphism in VB.Net?
✍: Guest
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 dept
obj.display()-to call the display method of emp class
ob.display-to call the display method of the dept class
// Late binding
create 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
2013-12-04, 1656👍, 0💬
Popular Posts:
What are the high-level thread states? The high-level thread states are ready, running, waiting, and...
How do I force the Dispose method to be called automatically, as clients can forget to call Dispose ...
Can we have shared events ? Yes, you can have shared event’s note only shared methods can raise shar...
If we have multiple AFTER Triggers on table how can we define the sequence of the triggers ? If a ta...
The object that contains all the properties and methods for every ASP.NET page, that is built is .. ...