tags:

views:

53

answers:

4

Does VB.NET have LINQ support? I was discussing VB vs C# tonight and I was told that VB is different because it does not handle web services as well as C# and that it does not support linq. Is this true?

+4  A: 

VB.NET definitely supports LINQ syntax. As far as web services are concerned I see no relation with LINQ.

Darin Dimitrov
No relation with LINQ, it just was another point of discussion as a difference between the two.
Moshe
`VB is different because it does not handle web services as well as C#` - this means nothing. The person that used this as argument to defend C# against VB.NET should have provided more detailed arguments.
Darin Dimitrov
Agreed, i'm not sure how that would even be the case, they both compile down to IL anyway.
Pierreten
+3  A: 

Yes, VB supports LINQ:

  • Its query expressions are actually richer than C#'s, in that there are various LINQ operators which are directly supported where you'd have to call the extension method directly in C#
  • It supports using extension methods as well, so you can still do things that the query expressions can't express

One area it does fall down on a bit is the conciseness of lambda expressions: from what I remember, VB9 didn't support anonymous functions with full bodies, and even in VB10 it ends up being wordier than C#.

I haven't used web services from VB, but I would be wary of accepting the truth of the claim that it doesn't handle them as well as C# if the source is the same one that told you it doesn't support LINQ...

Jon Skeet
+1  A: 

Working with WCF in VB.NET is just as easy as in C#, the same with ASMX Web Services.

Marc Bollinger
+1  A: 

You have received answers pertaining to the LINQ part of your question, so I won't cover that again. It sounds like a very general statement to say that VB.NET does not handle web services as well as C#.

I will be honest I am not a VB.NET fan, but I have needed to used it quite a bit over the years and I have never come across any specific weakness in VB.NET when it comes to web services. And that is for both ASMX and the WCF tooling.

Chris Taylor