May 2010
Intermediate to advanced
1272 pages
61h 18m
English
Polymorphism is another key concept in the object-oriented programming. As its name implies, polymorphism enables an object to assume different forms. In .NET development, it basically means that 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:

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 ...
Read now
Unlock full access