What’s the difference between an object initializer and a constructor?

Object Initializers were something added to C# 3, in order to simplify construction of objects when you’re using an object. Constructors run, given 0 or more parameters, and are used to create and initialize an object before the calling method gets the handle to the created object. For example: MyObject myObjectInstance = new MyObject(param1, param2); … Read more