© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
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#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Builder Pattern as Ref Struct
C
C# / help
3y ago
Builder pattern, multiple return types
C
C# / help
3y ago
✅ Repository Pattern question.
C
C# / help
3y ago
OOP design pattern question
C
C# / help
2y ago