What are the differences between C#.net and Visual Basic.net?

Performance is equivalent if you write equivalent code, but VB.NET has constructs that are in there for "backward compatibility" which should NEVER be used. C# doesn't have some of these things. I'm thinking specifically of:

  • Functions which are in the Microsoft.VisualBasic namespace which are members of other standard .NET classes like Trim(). The .NET classes are often faster.

  • Redim and Redim Preserve. Never to be used in .NET, but there they are in VB.

  • On Error ... instead of exceptions. Yuck!

  • Late binding (sometimes derisively called "Option Slow"). Not a good idea in a non-dynamic .NET language from a performance perspective.

VB is also missing things like automatic properties which makes it pretty undesirable for me. Not a performance issue, but worth keeping in mind.


The Language Features section of the Wikipedia article offers a good overview. Performance is essentially equivalent in almost every aspect, from what I understand.