String has a convenient String.IsNullOrEmpty method for checking whether a string is null or has zero length. Is there something similar in out-of-the-box .net?
String has a convenient String.IsNullOrEmpty method for checking whether a string is null or
Share
This is a more generic extension method that will work on any IEnumerable.
I’m not a big fan of functions that return true if something is empty, I always find most of the time I need to add a ! to the front of string.IsNullOrEmptyString. I would write it as “ExistsAndHasItems” or something like that.