ReSharper 2016.2 Help

Code Inspection: Use 'String.IsNullOrEmpty'

Consider the following code snippet:

public void SetName(string name) { if (name != null && name.Length > 0) myName = name; }

The above is quite common, and because of this, the String class has the IsNullOrEmpty() method that does the same check as above. Consequently, ReSharper will offer to change your code to use it.

See Also

Last modified: 15 December 2016