Code inspection: Redundant string interpolation
Last modified: 27 May 2024tip
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: