February 2010
Beginner
400 pages
11h 13m
English
Although in this book I am mainly covering C#, for completeness I will cover changes to VB.NET as well.
One of the aspects of VB.NET I really hated was the line continuation character (an underscore with a space before it). This particularly annoyed me when writing LINQ queries, because it made them less readable. Also, the underscore character is kind of awkward to type (OK, that's not that big an issue):
Dim numbers() As Integer = {1, 2, 3, 4, 5}
Dim query = from n in numbers _
Select n _
Where n>5
In .NET 4.0, in the majority of situations, this will no longer be necessary, as the compiler is now clever enough to work out how lines will be split. This then allows the above LINQ query to be rewritten ...