Is there a way to have a statement across multiple lines without the underscore character?
It is really annoying in multi-line strings such as SQL statements, and especially LINQ queries.
Beside from the ugliness and difficulty when changing a line (nothing lines up anymore), you can’t use comments in the middle of the multi-line statement.
Examples of my daily personal hell.
dim results = from a in articles _ where a.articleID = 4 _ ' articleID - Nope, can't do this select a.articleName dim createArticle as string = _ 'Create table article ' & _ ' (articleID int ' & _ ' ,articleName varchar(50) ' & _ ' )'
No, you have to use the underscore, but I believe that VB.NET 10 will allow multiple lines w/o the underscore, only requiring if it can’t figure out where the end should be.