Skip to content

Vogen + Result Types #649

Answered by SteveDunn
Foxtrek64 asked this question in Q&A
Jul 26, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @Foxtrek64 - thanks for the question. Yes, there is a better way that avoids exceptions. You can use the TryParse methods.
One returns a ValueObjectOrError and one return a bool and takes an out parameter.
I've just documented these here. Please feel free to edit that page if anything could be improved (there's an 'Edit page' link at the top).
I've also added some unit tests here that demonstrate its use.

I hope that answers your question.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Foxtrek64
Comment options

Answer selected by Foxtrek64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants