Saturday, June 25, 2016

Runaway string literals

The newest version of Visual Basic .NET allows multiline string literals, so that the resulting string values can contain linebreaks with no messing around with vbCrLf. The downside is that when the closing quote is removed (e.g. while backspacing out a string), the string literal can just go on and on. When that happens, code is temporarily reinterpreted as part of the string, blowing away syntax highlighting, causing errors in the Error List window, and slowing the machine. There does not appear to be a way to turn off multiline string literals or fix the runaway problem. I sincerely hope Microsoft fixes this soon, and I'll keep on the lookout for workarounds.

No comments:

Post a Comment