Check if a string is null or empty
By [)ia6l0 iii
Extension method to check if a string is null or empty
public static bool IsStringNullOrEmpty(this string inputString)
{
return (inputString == null || inputString.Length == 0);
}
Consider the above extension method as it as performance improvement over the conventional
String.IsNullorEmpty
Related FAQs
Extension method to check if an object is null
Extension method to check if an object is not null
Extension method to check if a substring exists in a string using Regular Expressions
Extension method to check if a string array contains a particular string
Check if a string is null or empty (1690 Views)