C#C
C#4y ago
Hulkstance

Builder pattern question

I have a Builder pattern for the options and since domainName and domainContainer are mandatory fields, I wonder if it's actually better to create WithXYZ methods for each one of them and have a string.IsNullOrEmpty check in Build() in opposed to setting them in the ctor
Was this page helpful?