May 2010
Intermediate to advanced
1272 pages
61h 18m
English
The previous section discussed the MyBase keyword and how it can be used to access members from a base class. The keyword also has another important purpose, which is about constructors. Consider the following constructor that is implemented within the Person class (that is, the base class) shown in the previous section:

The problem now is in derived classes. The rule is that if you have a constructor receiving arguments in the base class, you do need to provide a constructor receiving arguments also within a derived class, and the constructor needs to invoke the base class. The following code shows how a constructor ...
Read now
Unlock full access