With .NET 2.0 you can use:
// Indicates whether the specified string is null or an Empty string. string.IsNullOrEmpty(string value);
Also, since there is a new method in .NET 4.0 that goes a bit further:
// Indicates whether a specified string is null, empty, or consists only of white-space characters. string.IsNullOrWhiteSpace(string value);
madd0 Nov 22 '11 at 9:45 2011-11-22 09:45
source share