Factory Method Pattern (Example)
Following is an example of the Factory Method. In this case, a method call sets and returns the type. Also, pardon the values set as field, rather than as properties, but this is a simple example, rather than a full implementation.
A hidden constructor
Each class method instantiates the class differently.
Click the download button for FactoryMethod.txt...