Simple Factory vs Factory Method: Switch statement in factory vs. client
问题 I understand that one of the main advantages of the Factory Method over Simple Factory is that it doesn't violate the Open-Closed SOLID Principle. That is, the former doesn't require modifying the switch statement when new types are added. There is one piece on which I am hoping to get clarification. If I were to use a simple factory, I would have a factory like this (simplified): public class ObjectFactory { public static IObject CreateObject(ObjectTypeEnum objectType) { switch (objectType)