Desmond File

Blog archive

C# and VB: Coke or Pepsi?

A year ago, Microsoft's Scott Wiltamuth published an informative blog post that produced a lot of clarity around Microsoft's "co-evolution" strategy with C# and Visual Basic .NET. As product unit manager for Visual Studio Languages, Wiltamuth was able to provide a cogent breakdown of what Microsoft's commitment to its two flagship .NET languages really meant.

As Wiltamuth explained, .NET Framework has emerged as a "powerful unifying force" for the languages. He said C# and VB have two kinds of features, external ones like generics or LINQ that improve available API building blocks, and internal features that impact the languages themselves, such as changes to statements, expression and control flow.

Changes to features on the inside don't necessarily impact AP developers significantly, Wiltamuth wrote. But external changes are another matter. "In practice we have found that the best opportunities for language evolution and innovation have been in 'on the outside' language features rather than 'on the inside' ones," Wiltamuth wrote.

The upshot is that the new capabilities being introduced to VB and C# programmers are happening at the .NET level. And while significant feature differences between the languages certainly exist -- like VB's XML Literals or C#'s unsafe code feature -- the fact is that developers can access most of the same resources and achieve many of the same things using either language.

In fact, the biggest difference between the two languages could be Microsoft's uneven support. As any VB developer can tell you, Microsoft tends to release more, and more timely, code samples and guidance for C# than it does for VB. In fact, this situation is one of the reasons open source CMS provider DotNetNuke recently announced it was migrating its core CMS code from VB to C#.

It's been a year since Microsoft's co-evolution strategy for C# and VB was fully unveiled with the launch of Visual Studio 2010 and .NET Framework 4. What are your thoughts about Microsoft's handling of the two languages? Have you made a change in the language you rely on primarily, and if so, why? And what do you feel Microsoft could do to improve the way C# and VB are managed for the .NET developer community?

Email me at mdesmond@1105media.com, or leave a comment in the space below.

Posted by Michael Desmond on 03/21/2011 at 1:15 PM


comments powered by Disqus

Reader Comments:

Sat, Sep 24, 2011 Sol Thespider.com

At our office, we build apps with many different projects, mixing vb and c# in the same solution. This gets confusing but we decided to develop with both in the same solution. Vb is easy to read and c# is quicker to type. Don't get religious with code. Peace to all!

Mon, Jun 6, 2011 Eric

In a way, VB seems almost too easy. It attracts poor programmers, giving professional VB developers a bad name. Having said that, Microsoft *did* introduce features into VB.NET which enhance lazy programming such as automatic winform instances and turning off Option Strict by default. Then again VB has several minor benefits over C# as well though: readability, better editor error detection, more logical constructor syntax and parameterized properties. In the end I would say it's a dead heat between the two.

Wed, May 4, 2011 Subi Thayamkery

And the argument continues... Personally, I feel if you are a C# programmer you can still maintain VB.NET code. The reverse is not necessarily true.

Tue, May 3, 2011 TheComputerWizard Sandy Springs, Georgia

Microsoft makes their money by pulling the rug out from everyone every few years. Can you write Office or OS Scripts in C#? Are you better off Office 2010? Why is OpenOffice gaining popularity? Last week I had to take a document back to Word 2003 to work around a bug in Word 2010. VB is here to stay. So are old versions of Office. I think I made my case...

Tue, May 3, 2011 A hiring manager Seattle

When I look to hire programmers I prefer C# developers over VB.NET developers. The languages are practically identical in functionality but it’s the people that make the difference. The C# people tend to have a better understanding of design patterns, structures, programming theory, best practices, and generally more knowledgeable. I have found VB.NET programmers tend to be a little careless and reinvent the wheel frequently. I need fast team that can use design patterns to create reliable solutions. I don’t want to hire a person that cannot keep up with the rest of the team.

Tue, May 3, 2011 GerryO

When Microsoft abandoned VB by changing the language to VB.NET, I developed a few additional programs, but eventually reverted to VB6, which I still use and will continue to do so for the foreseeable future. MS should have continued with VB.

Tue, May 3, 2011 Pittsburgh

I'm a programming hobbyist who switched about a year ago from VB.Net to C# when I started to look into Silverlight and WPF. I don't regret it because most articles are written for C#, and it's not that difficult to make the switch.

Tue, May 3, 2011 Tony

Bottom line: Mediocre, poor-performing software comes from mediocre, poor performing programmers. And excellent, efficient software comes from excellent, efficient programmers. The language of choice has little to do with it. I will match-up my old code written in VB5 and VB6 against the best code written in any of today's modern languages. Using a "better" language does not make anyone a better programmer. I'd prefer to have a seasoned, experienced mechanic with rusty old tools working on my car than some punk prattling on about his shiny new tools.

Mon, Apr 4, 2011

Microsoft didn't invent OOP. But they did make a real fine implementation with the CTS. That CTS exists for both VB and C#. Since VB is mature and stable it can easily be caried forth as a standard language in VS. If they blend into a new language, say CB ??, then another compiler must be added to the mix and the dev must learn the new syntax. If they abandon VB, Microsoft will lose credibility as they have with their incessant OS de jour.

Fri, Apr 1, 2011 G UK

I have worked with VB.Net for years and all of our code has always been in VB.Net. However, we have now made the decision for all new development to be written in C#. This is mainly to do with Microsoft's main push on C#, training courses being offered more in C#, and when recruiting there is a 80/20 percent split in favour of C#. I've grown up with VB, but it seems Microsoft wants C# to be the "business" development language of choice...

Thu, Mar 31, 2011

I am really tired of C# zealots thinking that VB.NET are lower class developers. When really I find very little differences in developement but only significant in nerd dicussion circles which really don't have a grip on both languages. Both are equally development languages and are really transparent in debugging allowing you to flow from one to the other.

Thu, Mar 31, 2011

"In no uncertain terms does VB.NET have to stand back for C#. It is a first class language that can accomplish anything that C# can and it is widely used in industry. C# programmers just refuse to believe that, because they have a sense of superiority and will not recognise VB programmers as worthy. I don't mind either and also program in the language my clients pay for, but this debate has really run out its longevity. Why can't there be a place for both?" Yes, there is language snobbery and there is a problem with some coders still wanting to use VB6 instead of learning to use new objects or learn the features in the .Net framework

Tue, Mar 29, 2011 CHRIS MORSE USA

@DAVE: That's funny! Yes, real men program in Machine Code! And they do it with toggle switches on the front panel, without monitors. Anything else CHEATING!! Right??

Tue, Mar 29, 2011 Dave Earth

I love the C# weenies pounding the VB weenies. Got news for you, you are both programming wienies. C# and VB.Net are languages with training wheels for the programming newbie.

Get over it, you’re both bottom feeders.

Real men code in machine code. Ask someone old enough to grow a beard, they will tell you all about it.

Sat, Mar 26, 2011

Is there a mobile version of this site? Because trying to view it on a WP7 device (HTC Arrive) is very difficult, especially because of the popup on the main page.

Thu, Mar 24, 2011

"They definitely shouldn't learn C# or anything else new. They can be all cozy and safe in their comfort zone while all of us..." What is so "new" about C? Nothing. It is, in fact, older than "visual" so-called basic. Surely you know that by now. As for this "They" being "cozy and safe in their comfort zone." So you're obviously feeling threatened, eh? There is this scary "they" who are not like you? What is so wrong with someone wanting to be "cozy," as you put it? Are we humans not most productive when we are comfortable? You merely show your personal and unyielding bias with your condescending post; nothing more. Your "all of us" statement suggests that those who do not share your opinion are are obviously inferior. Well, you are simply wrong. People are entitled to have differing desires and tastes. Perhaps in time, you will realize that. There is always hope.

Thu, Mar 24, 2011

I think everyone who loves VB should stick with it no matter what the rest of the world is doing. Actually, I think they should abandon VB.NET altogether and move back to VB6 where they really want to be. They definitely shouldn't learn C# or anything else new. They can be all cozy and safe in their comfort zone while all of us misguided long term C/C++/C# developers stay on the twin treadmills of constantly having to learn the latest technologies and continually agonizing over choosing between job offers.

Thu, Mar 24, 2011

In no uncertain terms does VB.NET have to stand back for C#. It is a first class language that can accomplish anything that C# can and it is widely used in industry. C# programmers just refuse to believe that, because they have a sense of superiority and will not recognise VB programmers as worthy. I don't mind either and also program in the language my clients pay for, but this debate has really run out its longevity. Why can't there be a place for both?

Wed, Mar 23, 2011 Peter Vogel Canada

More books are written in C# than VB because books written in C# sell more copies than Visual Basic. This may because there are more C# developers than VB or because more C# programmers prefer having books than do VB programmers--who knows? However, discussions like this always bring out people who figure that their language is somehow superior to anyone else's and, as a result, everyone should convert to their language. It was first assembler, then Fortran, then COBOL, then C, then Java. The name changes but the claim never goes away. After you've programmed long enough (and programmed in more than two languages) you realize that your real tool is your brain and the language is, at best, secondary. I program in what my clients pay me to program in.

Wed, Mar 23, 2011 chrissie1 Belgium

It needs to be similar enough so we don't get the VB9.0 and C#3.0 difference in lambda support which was horrible at the time. Not sure how you would want them different apart from the syntax. But it would be nice to see MS make a bit more effort and then especially the evangelists. I could be wrong but the famous .Net people I know all do their presentations in C#. The webcamps are 100% c#. Most conferences like techdays are 100% c#. This will make VB.Net go to the background just because people will find it more logical to start with C#. I don't mind doing both but prefer VB. And it's not like the VB group is such a little group although it is hard to get hard numbers on that.

Wed, Mar 23, 2011 Michael Desmond Editor in Chief, Visual Studio Magazine

Both languages are indeed used by many thousands of developers. Of course VB6 had plenty of active support, yet that didn't stop Microsoft from dead-ending it in favor of VB.NET. I'm not saying MS would retire VB.NET, but it's clear Microsoft's first priority is advancing the .NET Framework. Can VB best do that in a co-evolution scheme, while plagued with lukewarm support? Or might it better serve .NET as a truly differentiated language?

Wed, Mar 23, 2011 chrissie1 Belgium

I made a post about this a little while ago http://blogs.lessthandot.com/index.php/All/?p=1136 you can see the hundreds of reactions on that one. And yes I think MS is neglecting VB.Net but I won't let it go without a fight. I promise.

Wed, Mar 23, 2011

I am a VB programmer, but I have to admit that there have been very few books written for Windows Presentation Foundation (WPF) in VB; most all books are written in C#. I think this is a telling omen that VB is a dying language and at some point, MS will stop supporting it

Tue, Mar 22, 2011 e los angeles

both languages are evolved because that was the whole foundation of the .net framework. Independent languages getting compiled to the same IL. There are more than just vb.net and c# that can be used and compiled to IL. To want to use just one language kind of defeats the purpose.

Tue, Mar 22, 2011 TonyKMN

Take a look at how many computer science programs include a course that uses VB. It's only a matter of time before it's no longer economically viable to support both languages. VB, for good or ill, has a stigma of being "that programming class math majors take".

Mon, Mar 21, 2011

Both languages need to continue to evolve because both languages are actively used by many thousands of developers. It sounds pretty arrogant for to suggest otherwise. Why should it matter that C# syntax might seem familiar to someone accustomed to another platform? The comfort and productivity of very long-time developers who are still working within the MS ecosystem is all that should matter. Career decline? Hah! If you're good and what you do and show results, who cares whether you type zillions of semicolons and braces all day or not. (Besides, not having to wade through all of that nonsense is anything but clunky.)

Mon, Mar 21, 2011

Why do both languages need to continue to be evolved? Leave aside your language preference and look at it objectively. MS has two languages that are first class citizens in .NET land - VB.NET and C#. They are, and have been, roughly at parity in terms of functionality and support. MS has a long history with the forebearers of both languages. GWBasic and VB "classic" for VB.NET. C and C++ for C#. There is a lot of code already written in both, but C# is pulling ahead of VB.NET in terms of real world usage. The marketplace, not MS, is choosing C# over VB.NET. The basic syntax of C# statements is very similar to C, C++, Java, Javascript, Objective C, etc. Developers from those languages can pretty much instantly understand code written in C# and vice versa. VB.NET statement syntax stands alone however. Only VB "classic" syntax is similar to VB.NET. Most former VB developers I know who have made the transition to C# are glad they did. It makes them much more employable. And after a relatively short time programming in C#, they say that VB code starts to look clunky. So why not announce that VB.NET is officially going to come to an evolutionary dead end after the next revision? It would give current VB developers who are sitting on the fence a clear message - move on or face career decline. MS could repurpose the resources it uses to keep VB.NET afloat to more productive pursuits.

Add Your Comments Now:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Comment:
Please type the letters/numbers you see above

.NET Insight

Sign up for our newsletter.

I agree to this site's Privacy Policy.