DEV Community

loading...

Discussion on: C# - Asserting a value is not null in null-aware code

Collapse
bjorg profile image
Steve Bjorg Author • Edited

Thanks for highlighting the fact that I didn't make the motivation clear for this. I'm not a fan of the null forgiving operator (!), because it's hard to track down. Using AssertIsNotNull() achieves the same outcome and it's easier to find.