July 2015
Intermediate to advanced
1300 pages
87h 27m
English
Polymorphism is another key concept in object-oriented programming (OOP). As its name implies, polymorphism enables an object to assume different forms. In .NET development, it means you can treat an object as another one, due to the implementation of common members. A first form of polymorphism is when you assign base classes with derived classes. For example, both Contact and Customer classes are derived of the Person class. Now consider the following code:
Dim c As New ContactDim cs As New Customer'C is of type ContactDim p As Person = c
The new instance of the Person class receives an assignment from an instance of the Contact class. This is always possible because Person is the parent of Contact (in which base is ...