I need to store a multiline string inside a variable:
dim str as string = "
some words
some words
some
words
"
How?
I need to store a multiline string inside a variable:
dim str as string = "
some words
some words
some
words
"
How?
No need to use the classes to insert new lines, you can do it like this:
Dim Logo As String= <a><![CDATA[
___ ___ _ _ _ _ _
| \/ | | || | (_)| |(_)
| . . | _ _ | || |_ _ | | _ _ __ ___
| |\/| || | | || || __|| || || || '_ \ / _ \
| | | || |_| || || |_ | || || || | | || __/
\_| |_/ \__,_||_| \__||_||_||_||_| |_| \___|
_____ _ _
/ ___|| | (_)
\ `--. | |_ _ __ _ _ __ __ _
`--. \| __|| '__|| || '_ \ / _` |
/\__/ /| |_ | | | || | | || (_| |
\____/ \__||_| |_||_| |_| \__, |
__/ |
|___/
]]></a>.Value
Console.WriteLine(Logo)
VB.Net has no such feature and it will not be coming in Visual Studio 2010.
look Multiline strings in VB.NET for workarounds
Make it like this ..
dim str as string = "some words" & vbCrlf & "some words" & vbCrlf & "some" & vbCrlf & "words"
OR try it with vbLf
you can use XML for this like
dim vrstr as string = <s>
some words
some words
some
words
</s>