Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-461461: Broken "To string.Format invocation" refactoring

$
0
0
Reporter Martin Suchan (Martin.Suchan) Martin Suchan (Martin.Suchan)
Created Oct 27, 2016 1:52:53 PM
Updated Apr 18, 2018 4:58:43 PM
Subsystem Context Actions
Assignee Slava Tutushkin (slava.tutushkin)
Priority Normal
State Submitted
Type Bug
Fix version No Fix versions
Affected versions 2016.2.2
Fixed In Version ReSharper Undefined
VsVersion VS 2015 RTM
If I have string concatenation expression like this:
string result = string1 + string2;
and I use the context menu "To string.Format invocation" refactoring with cursor on the +, the result expression is different than the expected one, see the gif below:

Current result
string.Format("{0}{0}", string1, string2);

Expected result:
string.Format("{0}{1}", string1, string2);
100% repro in VS2015, Windows 10, UWP project.

Btw. I'd appeciate if there was "To interpolated string" context menu operation as well, so I don't have to go through two steps.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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