© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
4 replies
Hulkstance

Builder pattern question

I have a Builder pattern for the options and since
domainName
domainName
and
domainContainer
domainContainer
are mandatory fields, I wonder if it's actually better to create
WithXYZ
WithXYZ
methods for each one of them and have a
string.IsNullOrEmpty
string.IsNullOrEmpty
check in
Build()
Build()
in opposed to setting them in the ctor
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Builder Pattern as Ref Struct
C#CC# / help
3y ago
Builder pattern, multiple return types
C#CC# / help
3y ago
✅ Repository Pattern question.
C#CC# / help
3y ago
OOP design pattern question
C#CC# / help
2y ago