Factory method pattern implementation in .net framework

Factory method pattern also called as Virtual Constructor (less known), defines an interface for creating objects, but defer the instantiation to sub-classes.

Read more about the pattern: Wikipedia, dofactory, Sourcemaking, oodesign, etc.

I can safely state, that: A well designed library cannot exist without implementing factory method pattern.

We can see .net framework implementing this pattern extensively, few examples:

comments powered by Disqus