Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Resharper give me a 'Localizable Interpolated String' hint here?

I'm using VS 2015 with Resharper Ultimate for a Win Forms application and was doing something as simple as setting the text property of a button when I saw the blue squiggly line below the string.

Clicking on it converts the statement to the one I've retyped just below the problematic statement and there's no blue squiggly. Note that it's got the verbatim and the interpolation operators.

Also, setting the same string to another string with just interpolation seems to work fine. There's no characters to escape in this string. What's happening here?

enter image description here

like image 586
Ash Avatar asked Feb 15 '17 11:02

Ash


1 Answers

As for verbatim string: Untick "ReSharper | Options | Code Editing | C# | Localization | Don't analyse verbatim string" checkbox and then ReSharper will show you such kind of suggestion for verbatim string as well.

As for why it shows squiggle for WinForms property but does not for a string: please refer to a webhelp article about "Localizable inspector" property. In case you would like to get the suggestion for all strings as well, you need to change "Localizable inspector" value to "Pessimistic"

like image 184
Alexander Kurakin Avatar answered Nov 09 '22 23:11

Alexander Kurakin