DEV Community

Discussion on: How to avoid the Factory pattern in C#

Collapse
shimmer profile image
Brian Berns Author • Edited

I'm not sure I follow you. Are you saying that we could create Beagle and GermanShepherd as subclasses of Dog? That's true, but I don't see how that would change the situation much.

Can you clarify, or give an example where a factory class makes more sense than a function?