The runtime automatically calls ToString for string concatenation operations.
For instance, the ToString is unnecessary in the following code:
var foo = "a" + new object().ToString();
It should become:
var foo = "a" + new object();
Should also mark the .ToString() invocation with WellKnownDiagnosticTags.Unnecessary.
Category: Style
Diagnostic Id: CC0118
Severity: Info
The runtime automatically calls
ToStringfor string concatenation operations.For instance, the
ToStringis unnecessary in the following code:It should become:
Should also mark the
.ToString()invocation withWellKnownDiagnosticTags.Unnecessary.Category:
StyleDiagnostic Id:
CC0118Severity:
Info