It looks like you want to set some properties, but not others, but not in a certain order of importance, so that you can define overloads with an extra number of arguments.
You can implement a constructor with the minimum required values ββthat sets default values ββfor another, and then use the object initializer to set the remaining relevant values:
// Didn't set properties 2 3 and 6, only set the ones needed in this case. SpaceObject ship = new SpaceObject(someRequiredValue) { Property1 = 50, Property4 = Game.Settings.Ships.Armor.Strong, Property5 = new PropertySet1{ Prop51 = "Enterprise", Prop53 = true, Prop57 = false };
Aneves
source share