• RonSijm
    link
    fedilink
    arrow-up
    4
    ·
    6 months ago

    myStr.IsNullOrEmpty() feels a bit weird to me, because you have to know that it’s an extension method.

    Otherwise it kinda looks like you might be trying to run a method of something that’s possibly null

    That’s the same design principle of why ArgumentNullException.ThrowIfNull(myStr) is not an extension method