Quantcast
Viewing all articles
Browse latest Browse all 106942

RSRP-463272: "Convert concatenation to interpolation" should not escape characters unnecessarily

Reporter Image may be NSFW.
Clik here to view.
Joe White (joewhite)
Joe White (joewhite)
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.

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.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>