Justin James confesses why he stuck with VB.NET for so long rather than moving to C# and reveals how life has been now that he's taken the plunge.
Over the last few years, I've been ashamed that I stuck with VB.NET rather than moving to C#. I know... it is completely irrational. To be frank, I never could justify moving to C#.
C# simply did not have any features that VB.NET did not have that I needed -- until the release of .NET 3.0. With that version, C# had LINQ and closures, and VB.NET did not; this was corrected in .NET 3.5 and Visual Studio 2008. Well, I've now made the jump.
Why I took the plunge
In December, I started a new job and a new project. (Ironically, my new employer is a VB and VBA shop that is making the leap to VB.NET.) The project isn't terribly fancy; it involves making modifications to a CMS system that we have licensed. It's written in C#.
Don't get me wrong -- I've been able to read C# for years. The .NET documentation has all samples in VB.NET and C#; lots of magazines use C# for examples, and so on. It helped that I worked with Java from 2001 – 2002, and I have tons of experience in other C-style languages. However, I didn't feel knowledgeable enough to actually write anything in C#. After all, modern mainstream languages are a lot more in-depth than older languages; the breadth of operators, constructs, etc. in C# is many times what C, Perl, Pascal, etc. have. (There is a reason why I think it's tough to become a programming expert!)
At a certain point, I began to feel bad about not using C#. In my experience, the more experienced .NET developers highly favor it; I felt left out of the Big Boy's Club. Additionally, I would recommend C# to people and yet not use it myself even though I saw some advantages to it over VB.NET. How hypocritical! Plus, it seems like most high-class programming publications almost exclusively use C#. In fact, I can't remember the last time I saw VB.NET exclusively in a publication. So while I couldn't justify the move, I felt a bit guilty about it.
Getting my feet wet
So now I have made the jump. I would love to be able to say that I read a great book and wrote a recipe organization application, but that would be a lie. I learned it by rolling up my sleeves and getting dirty. It took me a day or two to get used to the transition. Once in a blue moon I will do something dumb, usually involving a quotation mark (a C-style language that uses double-quotes strings feels wrong to me). But over all, it was not too bad.
The really sad thing is that I know I am good at learning new languages. I learned VB.NET on my own in an hour or two; I learned Perl by staring at some code for 30 minutes, and so on. I don't know why I kept putting off moving to C# -- maybe I am getting too old, and I feel like I've lost my mojo, or maybe it is the lack of time. Whatever the reason, I sure came up with a lot of excuses.
If you doubt whether you can move to C#, you can do it. C# is no more complex than Java, and it only feels more complex than VB.NET because it uses symbols where VB.NET often uses full words. The hard part is learning the .NET Framework. Conceptually, VB.NET and C# are very similar; they are statically typed (assuming you turn on "strict" and "explicit" in VB.NET like you should), compiled, object-oriented languages. Both VB.NET and C# support nearly identical feature sets. And if you have any familiarity with a C-style language (particularly Java), you will feel right at home.
So come on in… the water's fine!