
This article explains the use of the System.Reflection namespace classes to enumerate what classes have been derived from a selected base class at run-time. Instances of the derived classes are then created and stored in an array. The array can then be enumerated for a suitable class instance by an alternative implementation. This is useful if you wish to derive classes from a selected base and not have to tie them directly into code. Ensuring that they are derived from a single base class allows a minimum implementation to exist.
|