Convert interpolated string to 'string.Format'
Property | Value |
---|---|
Id | RR0201 |
Applicable Syntax | interpolated 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