Request: Extraction of concatenated strings.


My suggestion is that it should be possible to highlight a series of concatenated string values and extract them as a whole.
As it works today, if you have a string spanning two lines of code, such as:
string = "This is the first line of my string constant " + _
"and this is the second one."
you can't extract them to a single string resource.
A big disadvantage of this is that it makes it impossible to extract to resources any string that contains newlines in VB.Net, as newlines can't be embedded into strings as they can in C#, but they have to be concatenated (be it as Environment.NewLine, vbCrLf, Chr(10), etc).


uKER wrote Feb 20, 2009 at 5:24 PM

Also, on a related note, expressions such as:

MyString = "Today is " + VarDate + " and the time is " + VarTime + ".";

could perhaps be recognized as a full string and get refactored to

MyString = String.Format(Resources.MyString, new object[] {VarDate, VarTime});

wrote Feb 14, 2013 at 6:02 PM