Certainly there's the difference in general syntax, but what other critical distinctions exist? There are some differences, right?
views:
920answers:
12Since I assume you can google, I don't think a link to more sites is what you are looking for.
My answer: Choose base on the history of your developers. C# is more JAVA like, and probably C++ like. VB.NET was easier for VB programmers, but I guess that is no really an issue anymore sine there are no new .NET programmers coming from old VB.
My opinion is that VB is more productive then C#, it seems it is always ahead in terms of productivity tools (such as intelisense), and I would recommend vb over c# to someone that asks. Of course, someone that knows he prefers c# won't ask, and c# is probably the right choice for him.
The linked comparisons are very thorough, but as far as the main differences I would note the following:
C# has anonymous methodsVB has these now, too- C# has the yield keyword (iterator blocks)
- VB supports implicit late binding
- VB supports XML literals
- VB is case insensitive
- More out-of-the-box code snippets for VB
- More out-of-the-box refactoring tools for C#
In general the things MS focuses on for each vary, because the two languages are targeted at very different audiences. This blog post has a good summary of the target audiences. It is probably a good idea to determine which audience you are in, because it will determine what kind of tools you'll get from Microsoft.
Apart from syntax not that much any more. They both compile to exactly the same IL, so you can compile something as VB and reflect it into C#.
Most of the apparent differences are syntactic sugar. For instance VB appears to support dynamic types, but really they're just as static as C#'s - the VB compiler figures them out.
Visual Studio behaves differently with VB than with C# - it hides lots of functionality but adds background compiling (great for small projects, resource hogging for large ones) and better snippet support.
With more and more compiler 'magic' in C#3 VB.Net has really fallen behind. The only thing VB now has that C# doesn't is the handles
keyword - and that's of debatable benefit.
@Tom - that really useful, but a little out of date - VB.Net now supports XML docs too with '''
@Luke - VB.Net still doesn't have anon-methods, but does now support lambdas.
This may be considered syntax, but VB.NET is case insensitive while C# is case sensitive.
When it gets to IL its all just bits. That case insensitivity is just a precompiler pass. But the general consensus is, vb is more verbose. If you can write c# why not save your eyes and hands and write the smaller amount of code to do the same thing.
One glaring difference is in how they handle extension methods (Vb.Net actually allows something that C# doesn't - passing the type on which the extension method is being defined as ref): http://blog.gadodia.net/extension-methods-in-vbnet-and-c/
Scott Hanselman recently wrote an interesting article contrasting var and Dim: Back to Basics: var != Dim
VB has its VB-cry baby Option Strict = Off|On setting; C# only does it the right way.
The biggest difference in my opinion is the ability to write unsafe code in C#.