ReSharper
 
Get ReSharper
Get your hands on the new features ahead of the release by joining the Early Access Program for ReSharper 2025.1! Learn more

Code inspection: Use format specifier in format strings

Last modified: 06 June 2024

This inspection suggests specifying the string formatting within the format placeholder of the String.Format(), rather than in an explicit ToString() call on the argument.

In the example below, moving the format specifier into the placeholder improves the conciseness and readability of the code.