Wow, Your way of explanation is soo good. It's super simple to understand by your videos. I watched around 4-5 before yours and didn't understand this topic but you're the man♥️
@Ardalis Жыл бұрын
Glad it helped!
@Chapali9a Жыл бұрын
Great video for basic refactoring of badly written code. Love this new video format. Short, concise and easy to extravt 100% of its value.
@Ardalis Жыл бұрын
Glad you liked it!
@caseyspaulding6 ай бұрын
Great explanation. Thanks just learning this pattern
@Ardalis6 ай бұрын
You are welcome!
@thomasroustio8608 Жыл бұрын
Great explanation and example, thank you.
@Ardalis Жыл бұрын
You are welcome!
@erhanalankus Жыл бұрын
Nice video. I like the new hairstyle!
@Ardalis Жыл бұрын
Thanks! Been growing it out for about 15 months. It's still in that annoying stage where it wants to keep getting in my face, so you'll see me wearing hats a lot, too :)
@allannielsen4752 Жыл бұрын
i would never use guard clauses for validation. that said, if i'm guarding my class from invalid coding then i prefer Debug.Assert so i can catch it during my test phase. throwing exceptions should only be for exceptions, otherwise there are better solutions.
@Ardalis Жыл бұрын
Also reasonable approaches. I prefer exceptions because they will definitely stop invalid code paths from executing. But you're correct this should not be used for (first line) validation.