ReSharper 2017.1 Help

Code Inspection: Redundant string.Format() call

The String.Format() method is redundant if you use Console.WriteLine(). Console.WriteLine() actually has an overload that calls String.Format() before writing the result to the output stream.

Suboptimal codeAfter the quick-fix
Console.WriteLine(string.Format("This is {0}", z));
Console.WriteLine("This is {0}", z)
Last modified: 12 October 2017

See Also