Improving string.IsNullOrEmpty readability

JohnH

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
519
Location
Norway
Programming Experience
10+
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