This is probably really obvious and I’m being dense. In C# I can do this:
string = @"this is
some preformatted
text";
How do I do this in VB?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There isn’t one.
In C# you have the ability to do something like this “This ends in a new line\n.”, but in VB there’s no concept of that, you have predefined variables that handle that for you like “This ends in a new line” & vbNewLine
Hence, there’s no point in a string literal (@”something\n”) because in VB it would be interpreted literally anyway.
The problem with VB .NET is that a statement is deemed terminated at the end of a line, so you can’t do this
You’re forced to terminate your string on every line and use an underscore to indicate you wish to continue your statement, which makes you do something like