C# Related Questions...
What is object initializer???
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Nitin SontakkeRank #264 · 9.6K reputationPosted Jan 23, 2017, 12:07 AM EST
Vishal PrajapatiRank #836 · 2.7K reputationPosted Jan 23, 2017, 12:11 AM EST
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 beforethe calling method gets the handle to the created object.
1) http://www.c-sharpcorner.com/uploadfile/hirenvisavadiya/object-initializer-in-C-Sharp/
2) https://csharp.2000things.com/tag/object-initializer/
3) http://csharp.net-tutorials.com/csharp-3.0/object-initializers/
4) https://msdn.microsoft.com/en-us/library/bb397680.aspx
5) http://stackoverflow.com/questions/740658/whats-the-difference-between-an-object-initializer-and-a-constructor