I'm thinking of replacing a big case statement with a strategy pattern so that the case is handled by the program knowing what subclass it is and running the appropriate code. Somewhere internally the system will say "if class is X then run process for X". Is this slower than the original case statement? (Note, the subclasses will be in the same assembly as the base class)
Aucun commentaire:
Enregistrer un commentaire