Apart from syntax, what are the differences between VB.NET (VisualBasicDotNet) and C# (CsharpLanguage)?
You can't do everything with VB.net that you can do with C#. Examples:
- unsafe code (i.e. pointers)
- XML documentation generation (at least, not with IDE support, although 3rd party tools exist to extract documentation in triple quotes) Added in VB8
- unsigned ints using an intrinsic data type Added in VB8
- anonymous delegates (VB8 / C#2.0)
Does the opposite also hold, i.e. is there anything you could do with VB.net, but not with C#?
- Late Binding (can be achieved more-or-less via Reflection, but is not nearly as easy)
- VB's try/catch is more flexible (Filtered Exceptions)
- switch (VB = select) is far more flexible
- VB will do loads of implicit typecasting if you leave Option Strict off: not necessarily a good thing, though
- Parameterized Properties
- Syntax auto-completion is fuller that C#'s (e.g. automatically generating an End If for you)
- Full background compile in the IDE whilst typing, not just syntax checking as in C#
True, the last two don't extend the capabilities of the language but can have a productivity boost. The main thing VB-er's seem to really dislike about C# is case-sensitivity. (Not all though, I don't mind it at all.)
I've used both since the first betas of Visual Studio .NET and I can say they're strikingly similar. Granted, the Visual Basic syntax and style is somewhat different, but the CLR (Common Language Runtime) environment that all .NET langs have to fit in kind of sets a standard mold that is easy to see after little exposure. There isn't anything one can do in C# that can't be done just as easily in Visual Basic.
In fact, the first thing many people tell me after seeing C# and VB 7, is that they're so much the same now. This, of course, was one of Microsoft's goals. -- JeffPanici