C# versus VB.NET - the .NET showdown
I use VB.NET and C# every day. The main application I develop for uses VB.NET, but most new development I do is in C#, so I’m pretty familiar with the strengths and weaknesses of both. At this point in my career, I feel that I have figured out the one big difference between the two languages that keep fans of one language or the other firmly in their camp.
The main difference is nerd machismo – programmers thinking they are more “real” than other programmers because they use one language/toolset/strategy over a perceived “inferior” alternative. And the worst offenders in the .NET realm tend to be C# programmers.
I’ve heard it all – VB.NET is a toy language, lets programmers form bad habits, has a horrible syntax. Most things I hear are a matter of opinion anyways. Here are the facts:
- VB.NET is a first-class .NET language.
- VB.NET has features that C# doesn’t, and C# has features that VB.NET doesn’t. (For one thing, I love VB.NET’s auto-properties because I can set the value on the same line as the auto-property, something that C# is getting in its next version.)
- VB.NET and C# interoperability is seamless (in my experience, which is quite a bit.)
If given a choice between C# and VB.NET for a new project, I’d pick C# because I prefer it. And that’s all. I don’t think one is better than the other because, objectively, one isn’t better than the other for every possible application. The differences tend to come with how one person uses it over another, but that’s just a matter of experience.
Pick which one you’re more comfortable with and go with it. Don’t let others’ opinions sway you because they believe that one language is vastly superior to the other because it’s simply not true. Besides, when you have the power of the .NET Framework, you’re on the same team! It’s not VB.NET vs. C#, it’s VB.NET and C#.