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, 1938👍, 0💬
Popular Posts:
Where Do You Download JUnit? Where do I download JUnit? I don't think anyone will ask this question ...
How To Change the Password of Another User Account? - MySQL FAQs - Managing User Accounts and Access...
Enable ASP.NET polling using “web.config” file Now that all our database side is configured in order...
What is the difference between RegisterClientScriptBloc kand RegisterStartupScript? RegisterClientSc...
How To Analyze Tables with "mysqlcheck"? - MySQL FAQs - Administrator Tools for Managing MySQL Serve...