I just saw this
string response = GetResponse();
return response.ToString();
Is there any reasonable explanation for using the ToString()
method?
No, there isn't. The only reason why it is available is, because it comes from Object. (And String inherits from Object)
That does nothing, from ILSpy:
public override string ToString()
{
return this;
}
But maybe he wants to force a NullReferenceException
, although that would not be best-practise.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With