• Hello and welcome to our new forums. We upgraded our forum sites to a more robust and modern system which we hope you will enjoy. Be sure to check out your profile by clicking the button on the top right and configure your preferences, signature, time zone, avatar, etc. as you wish. If you need help with using this new forum'ware try the help link on the bottom right.

    Click here to review your account now.

Improving string.IsNullOrEmpty readability


C# Forum Moderator
Staff member
Apr 23, 2011
Programming Experience
Nullables HasValue mean just null, it doesn't for example mean an int with value 0. Similar an empty string is still a value, but you could argue that a null and empty string compares as equal values.
I would rather name the extension the same as the original though, since it is more accurate and I wouldn't have to think too much about what it actually means in different circumstances.
Top Bottom