Consider the following method.
public FolderProperty GetFolderProperty(Guid folderId, string propertyName)
{
// some code
}
Resharper suggests to check if propertyName != null, and when applied looks as follows:
public FolderProperty GetFolderProperty(Guid folderId, string propertyName)
{
if (propertyName == null)
{
throw new ArgumentNullException("propertyName");
}
// some code
}
However, since its a string, I would actually like to check if its null or empty. Can Resharper suggest both "check if propertyName is null" and "check if propertyName is null or empty". When the second one is selected, the following gets generated:
public FolderProperty GetFolderProperty(Guid folderId, string propertyName)
{
if (string.IsNullOrEmpty(propertyName))
{
throw new ArgumentNullException("propertyName");
}
}