Fog Creek Software
Discussion Board

Need help on the VB vs C# topic

Hi all

I have been reading intensively lately on the VB vs C# topic since my boss wants a report on the technical and business strategical viewpoints on the VB vs C# topic

Now I have enough technical viewpoint refferences but not enough to convince him on the business/strategical advantages that either would have above one another.

Please can someone give me a link or viewpoint on this subject.

Monday, July 5, 2004

The best strategy and business value is when you choose whatever language suits better the development team experience.

If they come from VB6 or ASP -> VB.NET
If they come from any other ->  C#

and that's it.

.NET Developer
Monday, July 5, 2004

In absolute terms, there is no significant business/strategical advantage that one language has over the other.

Microsoft has done a good job of making the two languages so similar that it is almost a case of 'which colour screw driver do you prefer using?'. I could even envisage a future where the two languages become one.

I think your boss is applying 'old school' thinking that the choice of language is vitally important to an organisation. It isn't. If the organisation has taken the big decision to go with .NET then the choice of language is a minor decision. You could even go ahead with both and do some projects in VB and some in C#.

The only real advantage you are likely to identify might come from the context of your organisation. For example, if you had a large legacy of Visual Basic code and/or skills then VB.NET might be advantageous. If the historical culture of the organisation is C/Java then C# might be the preference.

Monday, July 5, 2004

Thanks for your input,but I need to give refference to, for instance, corporations that implement either language due to the possible business adavantages either could have over the other.
Unfortunately I have to speak the same language that the directors speak, which is non-technical related. They want refference to, let's say Anglo American that uses to be able to see the strategic perspective to base the decision upon..Not just technical.

Damn, I think the only reason you need is technical but they dont agree

Monday, July 5, 2004

You are at the whim of Msft any way you look at it.  Drop to your knees and beg for mercy. ;-)

Brian R.
Monday, July 5, 2004

You might find what you are looking for in the Microsoft Customer Case Studies where you can browse by each of the development tools of VB and C#.

Monday, July 5, 2004

c# (c-hash) has the 'advantage' of the mono project implementation - any investment in skills may last longer/ have broader appeal in the long term ...

Monday, July 5, 2004

Surely the whole point of the .NET runtime is that it is language-neutral.

It doesn't matter*, from a technical point of view, which one you choose.

Just go with whatever your developers are most comfortable with.

I guess most developers, even those who are using VB/ASP, would prefer to go to C#, as its new and they probably think it looks good on their CV.

BTW, I believe that Microsoft are using C# internally to develop some of their products. I doubt that they are using VB.NET for much. Perhaps you should base your decision on this alone.

* Okay, so there are a few things that C# can do that VB.NET can't, and vice versa, but these are unlikely to be a problem in most cases.

Steve Jones (UK)
Monday, July 5, 2004

I suspect the issue here is that our OP has a preference - for the sake of argument, let's say it's for C# - but knows that since the company is full of VB programmers, management will see it as a no-brainer to standardise on VB.NET, thus condemning him to a fate worse than death (invert language choice to suit).

In any company where non-technical management gets to choose technologies - be it a language or a tool - there's got to be a clear business driver for anything that smacks of a change, or else the status quo will rule.

Sadly, I'm afraid, there is no business justification to go with either language over the other. Experience shows that it's as quick and easy to train VBers up to .NET in C# as it is in VB.NET - the real brainf**k is OO, components and the whole BCL. So no real savings to be made there.

If you think it might carry any weight at all, have a vote among the development team and see who wants to do what. I did this when I moved my team to .NET and, to my surprise, they all wanted to use C# over VB.NET. Of course, the decision was ultimately mine and I didn't have to justify it on business grounds (the decision to go with .NET was signed off on, everything else was up to me to decide), so I wasn't in your precise situation. But it certainly helped to have the development team backing me all the way.

Neil Hewitt
Monday, July 5, 2004

> BTW, I believe that Microsoft are using C# internally
> to develop some of their products. I doubt that they
> are using VB.NET for much. Perhaps you should
> base your decision on this alone.

My guess would be that they would be using C++ or managed C++, essentially C# is no more, no less a toy than VB.Net is.

That's not an advocacy of any of the three over the others.

Besides: you always have J#, F#, Cω (C-omega)... and those are just some Microsoft languages targeting the .Net CLR and Framework.  Plenty more out there as well though Delphi might be the only serious contender at the present time.

Drudy Mialnam
Monday, July 5, 2004

Sorry - wrong. Those portions of the CLR that are written in managed code - the base class library being the largest part - were all written in C# (go download Rotor if you don't believe me). The managed code in Longhorn is mostly being written in C#. Those portions of VS.NET which are managed were written in C#. There is some VB.NET around, but it's mostly in those products which are part of the VB.NET package in some way.

Where MS is writing new managed code, the default is to do so in C#. Where MS is porting existing C++ code to managed, then Managed C++ is obviously the way they're going.

C# is not a toy (any more than VB.NET is). Just because it's managed does not mean it isn't 'real' code. Or are we going to go back to the days of 'real men do it in assembler, none of that toy C++ stuff'?

Neil Hewitt
Monday, July 5, 2004

VB.Net for working with COM interop,
C# otherwise.

Monday, July 5, 2004

"VB.Net for working with COM interop,
C# otherwise. "

Whoa, that one caught me off guard. Why do you say that? That makes it sound like one of us is missing something obvious, and if past performance is any indication, it's likely me :)

Ron Porter
Monday, July 5, 2004

Many COM interfaces have optional parameters. Unfortunately, C# doesn't support optional parameters, and so has to fill in each parameter of the argument list with Type.Missing for unnecessary parameters, like so:

Some_COM_Method(ObjectA, intB, boolC, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);

For methods that can take up to 30 arguments, and for which you only want to set a couple to the non-default value, this is a true pain.

The same is true if you want to script MSOffice with .Net.  Use VB.Net.

Monday, July 5, 2004

I'll add that to my list of insightful snippets...

Andrew Cherry
Monday, July 5, 2004

Aha, gotcha. Using VB.NET for MSOffice automation and COM Interop eases the pain in dealing with optional parameters.

And all is right with the world; if there's something obvious, I'll miss it :)

Ron Porter
Monday, July 5, 2004

"since the company is full of VB programmers, management will see it as a no-brainer to standardise on VB.NET,"

This is the one mindset I try to fight. My biggest fear is that the perception is that VB6->VB.Net is like VB5->VB6: Install Visual Studio on Monday, be writing production code by Friday.


Both C# and VB.Net share the massive learning curve of the .Net framework, and a new way of thinking (esp if your VB developers aren't OO'ing it)

The advice I got, followed, and was very happy with when I made the jump:

Since I was going to be supporting VB6 apps while moving forwards in .Net, then the suggestion was that because C#'s curly quotes land is somewhat different from Begin/End, then it would be easier to maintain focus on the language when moving back and forth between VB6 and C# projects.

If a=b then
end if


If (a==b)

My $.02


Monday, July 5, 2004

VB.NET does not have the "using" statement.  E.g.

using (Bob bob = new Bob())
  //do stuff with bob
} //Bob.Dispose is automatically called here

I'd miss that if I was working in VB.

You might like to see the list here:

I suspect, but I don't know for sure, that C# programmers outnumber VB.NET ones, and that code samples etc found on the net are more likely to be C# than VB.NET.



John Rusk
Monday, July 5, 2004

PS the link I just posted does not cover the new features of C# (generics, anonymous delegates, nullable types etc.) I understand that VB will get some of these ( ) but I don't know about all of them.  If VB doesn't get all these, that might be a point in C#'s favour (at least for teams with the skills and experience to take advantage of the new features.)

John Rusk
Monday, July 5, 2004


No with - statement in VB.NET ?

Monday, July 5, 2004

"This is the one mindset I try to fight. My biggest fear is that the perception is that VB6->VB.Net is like VB5->VB6: Install Visual Studio on Monday, be writing production code by Friday.


I absolutely agree. However, this is the mindset that non-technical managers (and those who used to be technical and think they still are) tend to apply. The sort of shop where deciding on a language to use requires six months of committee meetings followed by the issuing of a 500-page guidelines document. "Surely", they think,"VB is VB? We can leverage our existing skillset and save the company some money! My bonus will be huge!"

The fundamental issue here is that .NET is a serious leap for the programmer who hasn't done OO before. All of the VB6ers and ASPers are at a major disadvantage to anyone with C++ or Java experience. Obviously, many coders doing primarily VB6 have done OO as well but moved where the money is (or was). But many others don't know a virtual method from a static initialiser. Judging by some of the crap ASP.NET code I've been seeing recently, it looks like many companies are expecting their ASP guys to port over with not much more than a week's conversion time.

Depressing, innit? :-(

Neil Hewitt
Monday, July 5, 2004

Hi Michael,

If you truly want some help you might want to think about providing us with some more information about your employer such as:

* number of developers and their skill set
* the type of employer you work for (ISV, consulting firm, non IT related, etc.)

The reason why is that in many situations a company won't be able to standardize on only one programming language. For example:

* Jonathan Goodyear (aka the AngryCoder) owns a small consulting firm and he has found that which programming language (VB .NET vs. C#) he and his employees use on a software project SOMETIMES depends on what the client demands they use.

* Sometimes a company might need to hire a contractor or full-time employee based on an important non-technical reason (i.e. domain knowledge) which in this instance is more important to the company than which programming language that person knows extremely well.

* I have seen a VB project that had to hire a C++ contractor to do some work that VB couldn't handle. While your company may not run into this problem with VB.NET/C# there is a good chance that some future project might hit a technical snag and nobody on the team knows how to solve the problem in a timely manner. I can envision a scenario where a distressed project manager might decide to hire a contractor who knows how to solve the technical problem but he/she only knows C# and doesn't know VB .NET (the programming language being used on the current project).

One Programmer's Opinion
Monday, July 5, 2004

C# for class libraries, IMHO.

C# supports in-line XML documentation.  Combined with nDoc, this is a killer combo.

VB.NET, AFAIK, does not support in-line XML documentation out of the box.  There are 3rd party tools, I'm sure, but you don't want to rely on 3rd party tools unless you have to.

Of course, I hear VB.NET is supposed to get it in 2.0, but that's not coming out until SQL Server Yukon is ready (2005).

Richard P
Tuesday, July 6, 2004


No with - statement in VB.NET ?

With (VB) and using (C#) are not equivalent.

Anonymous Coward
Thursday, July 8, 2004

*  Recent Topics

*  Fog Creek Home