ReSharper marks ToString() as redundant, but it might be correct.
In the following code
string s = null;
Console.WriteLine(s.ToString());
.ToString() is marked as redundant, but removing it would actually change the functionality. This case is obviously simplistic, and there are better ways to check whether an object is null.
Please sign in to leave a comment.
I have an override on ToString: So yes, needs to be ignored
public override string ToString()
{
return JsonConvert.SerializeObject(this);
}