My Graceful Daughter, Laura |
C#, for example, allows an At-Sign prefix, so
string ThisString @="line one
Line two
Line three";
Python supports it as follows:Line two
Line three";
aString ="""line oneBut in VB, you're forced to do
Line two
Line three"""
Dim aString as String ="line one " & _
"Line two " & _ "Line three "
That's both annoying, error-prone (it bites me most with multiple-line SQL statements where I forgot to put a space between a field name in the SELECT and the FROM clause.)
But I found a neat way to do away with the concatenation.
Use the XML Linq library
Imports System.XML
Imports System.XML.Linq
Imports System.Core
Dim aString As String = <![CDATA[Line one
Line Two
Line Three]]>.Value