String.ToString有没有合理的用途?

Jad*_*ias 4 c# string clone object tostring

我刚看到这个

string response = GetResponse();
return response.ToString();
Run Code Online (Sandbox Code Playgroud)

使用该ToString()方法有合理的解释吗?

Jan*_*Doe 11

不,没有.它可用的唯一原因是,因为它来自Object.(And String继承自Object)


Tim*_*ter 5

从ILSpy那里无所作为:

public override string ToString()
{
    return this;
}
Run Code Online (Sandbox Code Playgroud)

但也许他想强迫一个NullReferenceException,虽然这不是最好的做法.