Property-based object initialization and role of default constructor?

When there is a default-constructor present in the class, we are good to create objects using property-based object initialization. But after adding parametrized-constructor without having a default-constructor.. or .. making default constructor inaccessible (e.g.: making it private), property-based object initialization stops working.

Why property-based object initialization depends on default-constructor. Is there a workaround?

by websanskriti via /r/csharp

Leave a Reply