Factory Pattern – CreateInstance static or not?

I’m very hesitant to categorize “instance versus static” as a matter of taste. This sort of implies that it’s aesthetic like a favorite color or, more appropos, camelCase versus PascalCase. Instance versus static is more a question of tradeoffs. With instance members of any kind, you get all of the benefits of polymorphism, since you … Read more

Is this Factory Method creation pattern?

I would agree to call the method a “Factory Method”, though the design is not strictly a “Factory Method Pattern”. Here is a key point (from Wikipedia): …The Factory method lets a class defer instantiation to subclasses.” Since your class is static and method static (hence non-virtual), there is no “deferring” possible. Conceptually, notice also, … Read more