Reporter |
Image may be NSFW. Clik here to view. ![]() |
---|---|
Created | Feb 26, 2017 4:20:41 AM |
Updated | Apr 11, 2018 5:24:40 PM |
Subsystem | Quick Fixes |
Assignee | Andrey Dyatlov (Andrey.Dyatlov) |
Priority | Normal |
State | Fixed In Branch |
Type | Cosmetics |
Fix version | No Fix versions |
Affected versions | 2016.3.2 |
Fixed In Version ReSharper | Undefined |
VsVersion | VS 2015 RTM |
Repro: Enter the following two lines into a method, then put the cursor on either of the "+" signs and Alt+Enter > Convert concatenation to interpolation.
Expected: The code should be converted to:
Actual: The apostrophes are escaped unnecessarily:
Cosmetic issue only, but ReSharper shouldn't be generating unnecessary code.
return "'" + DateTime.Now + "'";
Expected: The code should be converted to:
return $"'{DateTime.Now}'";
Actual: The apostrophes are escaped unnecessarily:
return $"\'{DateTime.Now}\'";
Cosmetic issue only, but ReSharper shouldn't be generating unnecessary code.