Code inspection: Nested string interpolation can be inlined
This inspection reports an interpolated string inserted inside another interpolated string. This usually happens when a nested $"..." is used only to produce text for the outer interpolation.
Example
The nested interpolation can be merged into the containing string, which makes the code shorter and easier to read.
string message = $"User: {$"{firstName} {lastName}"}";
string message = $"User: {firstName} {lastName}";
Quick-fix
Merge the nested string interpolation with the containing interpolation.
29 March 2026