The requested page is not available for the requested platform. You are viewing the content for Default platform.
All docs
V19.2
19.2
19.1
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

CRR0052 - String interpolation can be used

This analyzer identifies composed string expressions which can be converted to interpolated strings. Interpolated strings are easier to read than formatted strings.

return "Found record at the position " + i;

To fix this issue, use the interpolated string instead of the composed string expression.

return $"Found record at the position {i}";

Call the Convert to String Interpolation refactoring to replace the composed string with an interpolated string. To do it in different places at once, use the Code Cleanup feature with the Convert to String Interpolation rule enabled.