JetBrains Rider 2017.2 Help

Code Inspection: Use string interpolation expression

Starting from C# 6.0, you can use string interpolation expressions instead of calling String.Format(). If you pass a lot of arguments to the String.Format() method, the string becomes difficult to understand. Compared to String.Format(), interpolated string expressions allow inserting variables directly in the string.

Suboptimal codeAfter the quick-fix
Console.WriteLine(string.Format("this is {0}", z));
Console.WriteLine($"this is {z}");
Last modified: 23 November 2017

See Also