Object Initializer #8277
Unanswered
MhAllan
asked this question in
Language Ideas
Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There is a need to validate instances created by initializers only, everytime I have domain model I find myself forced to create constructor with parameters just for the sake of validation, you can call validation int the property init or set, but that will be repeated a lot and will be called randomly while you want to validate after all properties are set, I suggest to have Initializer, which is called after all properties been set in object initialization.
Beta Was this translation helpful? Give feedback.
All reactions