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: Redundant string interpolation

Last modified: 27 May 2024

This inspection reports interpolated strings that do not have any interpolation expressions inside. In this case, the interpolated strings — for example $"text" — can be replaced with a regular string literal "text".

Although the redundant $ character will not influence your code in any way, this inspection can still help you spot places that look like interpolated expressions but are not: