Object and Collection Initializers #csharp

I would like to have a way to declare auto property setters as private, but still be able to use them in object initializers. Something like this: class Dog { public int Age { get; private set; } public string Name { get; private set; } } and then be able to do this: DogContinue reading “Object and Collection Initializers #csharp”