One of the most compelling differences for me is that C# generally has a more concise syntax. This manifests itself especially with lambda expressions. Although VB.Net now has the same functionality, I find the VB.Net syntax way too verbose.
E.g., if you use the LINQ 'Fluent API' syntax:
C#
var addresses = _users
.Where(u => u.Name == "scott")
.Select(u => u.Address)
Admittedly, the syntax can be a little weird at first, but as soon as you're used to it this actually becomes very readable. Compare this with VB.Net:
Dim addresses = _users _
.Where(Function(u) As Boolean
return u.Name = "scott"
End Function) _
.Select(Function(u) as Address
Return u.Address
End Function)
EDIT:
Apparently I was misinformed...
The above code is only valid in VB10 (where they added multiline lambda statements), but can be written more concisely as follows:
Dim addresses = users _
.Where(Function(u) u.Name = "scott") _
.Select(Function(u) u.Address)
Apart from the ugly underscores and the Function
keyword instead of the =>
, this is mostly the same. Still prefer the C# syntax though ;-)