Prefer Factories over Contructors

Saturday, February 5, 2005 3:48 AM
Microsoft MVP Logo

Brian Wilson has a good article why factories are better than contructors. He outlines a few reasons why:

  1. Constructors cannot be named
  2. Constructors must return objects
  3. Constructors must return single objects
  4. Constructors must return objects of a specific type

Great article and a quick read.

» Prefer Factories to Constructors

comments powered by Disqus