Skip to main content

Convert interpolated string to 'string.Format'

PropertyValue
IdRR0201
Applicable Syntaxinterpolated string
Enabled by Default

Usage

Example #1

before.cs
$"name: {name,0:f}, value: {value}"
after.cs
string.Format("name: {0,0:f} value: {1}", name, value)

Configuration

roslynator_refactoring.convert_interpolated_string_to_string_format.enabled = true|false