Nearly all my programming in the .NET environment has been with Visual Basic .NET. I have been using the 2003 version which accesses the 1.1 version of the .NET Framework. All in all it is pretty good, certainly, in my opinion, much better than previous versions of Visual Basic.
I have also, from time to time, written a small amount in C#. It has been many years since I did much C programming. The last time I was employed Visual Basic was used for all Windows programming, and during my time there we used every version of Visual Basic from 3 to 6. So it was natural that when I went out on my own I would stick to what I knew.
However, a few days ago I downloaded Express version of Visual C# 2005, and SQLServer 2005 Express and had a bit of a play with them. I have been thinking of upgrading to Visual Studio 2005, but I still have clients running Windows 98, so, for the moment, I am sticking with the Version 1.1 Framework.
But it can’t hurt to be prepared, and it is nice to be able to show clients what they can expect after they upgrade their Windows, because there are things in the latest versions of Visual Studio that just weren’t available previously.
Another big plus is that SQLServer 2005 has taken over from MSDE, which was a nightmare to deploy.
Most of my clients are small businesses and they use Access – or more correctly, JET – databases. It would be nice to get them off Access and onto a real database.
There are a number of improvements in the latest version of C#. You can read all the hype at Microsoft. What you won’t read there are the bugs. But it seems that they are going to provide upgrades, or patches, at reasonably frequent intervals, unlike their practice with Visual Studio 2003. There are a number of bugs in the 2003 version which they are not going to fix. If you run the world I suppose you can get away with that.
The nicest thing about the new C#, to my mind, is Intellisense. A lot of people decry it, I love it. It is especially helpful when you are using some form of code generation, which I do for the data access layer. Because you don’t build some of the code yourself you are less likely to remember what the properties are in each of the classes. A little bit of reminding is very handy.
C# and VB produce, in most cases, identical code for the Common Language Runtime. Instead of compiling to object code the .NET Framework compiles to Intermediate Language, which is used by the framework. So the choice of which language to use is entirely up to the coder. C# is more compact, and so, probably, a bit quicker to code in. There are also more tools around for C#, and increasingly, more is written about C# than VB. So if you are looking for examples on unit testing, or refactoring, or documenting your code you will find much more that is aimed at the C# developer.
The final nice touch, for those of us not used to languages with monkey tails { and }, the IDE shows the matching braces, a great help when you have a bundle of them at the end of a function. Or perhaps that is another indication that more refactoring is in order.