IsNotNullOrEmpty
Returns true when a given string is not null or empty
Source
public static bool IsNotNullOrEmpty(this string input) {
return !String.IsNullOrEmpty(input);
}
Example
string a = "demo";
string b = string.Empty;
string c = null;
Console.WriteLine(a.IsNotNullOrEmpty()); // true
Console.WriteLine(b.IsNotNullOrEmpty()); // false
Console.WriteLine(c.IsNotNullOrEmpty()); // false