Even if there are 10 properties, as you say, if they are required, and it makes no sense to give them default values, I would say by putting them all in the constructor.
If some of them may have reasonable default values, you can leave them outside the constructor and just set them to default values.
If none of the above is viable, for example, an object may need to be built before the values โโfor these properties are known, then I will see if it makes sense that the required properties can be passed as parameters to the method (for example , it either does not have many parameters, or cannot be called many times, or if it really responds to its own internal state.)
A ban on all of the above, an exception should be thrown. You also mention "Throw an exception and expect the user to catch it?" The purpose of throwing an exception should not be that you expect the caller to catch him, you should expect them to be sure that the property is set. Catching this should be the last resort when they cannot intelligently verify that the property is set, and they donโt care if your method fails as a result.
Davy8 source share