Is string check returns false

To meet your method name, you need this: protected bool IsStringAndNotNullAndEmpty(object value) { var s = value as string; return s == string.Empty; } Changing its name to IsEmptyString(object value) would be clearer though. It seems the OP actually wants a method that returns true for non-empty strings. So what is required is: protected bool … Read more