The .NET Framework supports a variety of programming languages, including Microsoft’s much heralded C#. Huw Collingbourne considers whether Visual Basic is still as sharp as the competition.
Originally published on DNJ Online, March 2005
In the past, different programming languages tended to do things in their own way. Programmers using C++ would, in all probability, make use of the types and routines provided by the Microsoft Foundation Classes (MFC) libraries; Visual Basic had its own built-in types and routines;
non-Microsoft languages such as Delphi and Java used yet other class libraries, each of which was incompatible with each other.
With the advent of .NET that has changed. No matter which programming language you use, you will have access to the same rich collection of classes and functions provided by the .NET
Framework. Indeed, it is even possible to write classes in one language and derive descendant classes from them in another language. Your source code is not compiled directly into a machine code executable. Instead it is translated into Microsoft Intermediate Language (MSIL). This intermediate language is only converted into machine code when the program is run by the .NET Common Language Runtime (CLR).
In effect, the .NET CLR understands only one language: MSIL. This means that it really doesn’t matter which language your programs are written in. Whether they were written in C#, J#, VB, Delphi or some other .NET language, they will all end up as MSIL. Given the fact that all .NET programming languages have access to the same class library, are translated to the same intermediate language and are executed by the same runtime system, you may wonder what, if anything, there is to choose between them. In this article, I shall be taking a close look at Microsoft’s two principal .NET languages, C# and VB.NET, in an attempt to answer this question. Read More