Table of Contents

About

A constructor is a method from a class that instantiate (build) an object.

See also the method of object construction (ie dependency resolution)

Static Constructor

A static constructor is a static method that wrap the construction and returns an object

Advantages:

  • They permits to easily change and see the parameter used for the construction
  • They can cache object (not really a plus to have cache)
  • They permits an easy way to refactor.
  • There is not the new object. Easy refactoring
  • Code completion