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, 1951👍, 0💬
Popular Posts:
What's the difference between J2SDK 1.5 and J2SDK 5.0? There is no difference, Sun Microsystems just...
Explain simple Walk through of XmlReader ? In this section we will do a simple walkthrough of how to...
What Are Named Parameters? - Oracle DBA FAQ - Creating Your Own PL/SQL Procedures and Functions Name...
What are some advantages and disadvantages of Java Sockets? Advantages of Java Sockets: Sockets are ...
Can JavaScript steal text from your clipboard? It is true, text you last copied for pasting (copy &a...