VB Multiline string indention
I have a query that I am putting into my VB.NET code. I want to be able to indent it so that it is easy to follow, but every time I indent and then go to another line my indentation is lost. I can not find a setting to allow manual indentation in Visual studio settings or resharper.
For example, I want something like the indentation below, but I am never able to get it.
Dim sql = "select * " & _
"from t1 " & _
"inner join t2 " & _
"on t1.d = t2.d " & _
"inner join t3 " & _
"on t1.d = t3.d"
Thank you for your assistance!
Please sign in to leave a comment.
Try @ symbol before one big string that spans for multiple lines.
like that:
var sql = @"select *
from t1
inner join t2
on t1.d = t2.d
inner join t3
on t1.d = t3.d"
Thanks Alexey, but that only works in C#. Unfortunately, I am required to work in VB.NET.