How to disable automatic line detection in VS2015?

I use VB.NET, and my code contains many lines, which often have double quotes inside them. My problem is that when I correct the string to avoid double quotes (replacing each string with "by" inside the inner string), it mixes up with the actual code, temporarily assuming everything is a string (since don 'double quotes t match up) and completely ruin the formatting of the other lines.It is assumed that the beginning of the next line is the end of the current line, which forces the actual line to be interpreted and formatted as the code I need to return and fix (since it adds a space s and other formatting characters that do not actually exist).

Is there any way to disable this behavior? I did not have the same problem in VS2013. I look under Tools> Options> Text Editor> General, but I could not find anything suitable.

Additional info: I can simply change the lines in a separate text document to avoid all double quotes (which I was referring to now), but in VS2013 I could just copy / paste the lines directly into my code without messing up the existing lines, temporarily interpreting them as a code due to the uneven amount of double quotes.

This behavior is especially problematic when manually adding double quotes to strings, because if you do not escape them quickly enough (or make a short typo at the same time), you will get the same problem.

You may have noticed that for other languages, such as C ++, writing a line on one line (even with an odd number of double quotes) does not affect outgoing lines. The same behavior for VB would be wonderful, assuming there are some settings to enable it.

+3
source share
2 answers

Yes, this is an inconvenience.

What I usually do is add an unused character (for example, some unused character on the keyboard or Alt + {some number}) instead of double quotes. When I finished building my string the way I want, I simply end it, either by creating a Find and Replace window, and replacing this character with two double quotes. Or just put the REPLACE statement immediately after it, replacing this character with Chr(34) .

0
source

Use Chr (34) instead, or if you end up repeating lines, save them as a resource .

-2
source

All Articles