Syntax:
public static bool IsNullOrEmpty(String str)
Explanation: This method will take a parameter which is of type System.String and this method will returns a boolean value. If the str parameter is null or an empty string (“”) then return True otherwise return False.
Example:
Input : str = null // initialize by null value String.IsNullOrEmpty(str) Output: True Input : str = String.Empty // initialize by empty value String.IsNullOrEmpty(str) Output: True
No comments:
Post a Comment