Roslyn: "Convert to interpolated string" only offered on the existing string parts, rather than what would become the entire interpolated string

Created on 6 Feb 2017  路  3Comments  路  Source: dotnet/roslyn

Version Used: 26205.0

Maybe this is by design, but it struck me as odd. Given the following C#:
C# Console.WriteLine(3 + "Hi" + 3 + "There");

"Convert to interpolated string" is only offered if the caret is touching the "Hi" or the "There" (quotation marks included), but not elsewhere.

4 - In Review Area-IDE Bug

Most helpful comment

@Pilchie: @kuhlenh may be a dreamer, but she's not the only one. I also have dreams of tweaking the available span for this particular refactoring.

As part of #Hacktoberfest, I've started working on this. If all goes well, I expect to be able to open a pull request tomorrow.

All 3 comments

Tagging @kuhlenh who has dreams of tweaking the available spans of all of our refactorings.

@Pilchie: @kuhlenh may be a dreamer, but she's not the only one. I also have dreams of tweaking the available span for this particular refactoring.

As part of #Hacktoberfest, I've started working on this. If all goes well, I expect to be able to open a pull request tomorrow.

Awesome. Tagging @jinujoseph and @sharwell too.

Was this page helpful?
0 / 5 - 0 ratings