Great Article!
I've been using the guard clauses a lot in my recent framework.
While mine might look a bit more hacky, it does the same as your code snippet:
publicOrderService(IEmailServiceemailService){_=emailService??thrownewArgumentNullException(nameof(emailService));// do rest of code here}
I've been using that line throughout my code base, just to reduce internal screams. xD
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great Article!
I've been using the guard clauses a lot in my recent framework.
While mine might look a bit more hacky, it does the same as your code snippet:
I've been using that line throughout my code base, just to reduce internal screams. xD