C Sharp - A brief introduction of sorts

C Sharp (C#) is one of the .NET languages developed by Microsoft which utilises the Common Language Infrastructure (CLI). The CLI can be thought of as a translator. The programmer writes the code in whatever .NET language he/she wishes to and compiles it. The application really isn't an application, more a set of instructions that the CLI understands and then converts into something the computer understands natively. The upshot is that if you write something in a CLI compliant language, it will run on any machine which has the interpreter installed.

This is nothing new. Someone out there is bound to say yeah, Java did this years ago and they'd be correct. However, many moons before Java came out (circa 1982), another attempt at an interpreted common language was created in the Netherlands called . Basicode was a small piece of code loaded onto the host machine. The software was then transmitted over the radio, read in from cassette tapes and then interpreted into the host machine's own version of BASIC. Very clever, but quite cumbersome.

Why not just use Java?

Simple reasons - ease of use and the developers kit

Though I hate to admit to liking anything from Microsoft, I think VisualBasic .NET is possibly one of the simplest to learn and use languages around. I had previously used VB5 at Salford and VB6 in passing and neither really made any real impression on me. Then I had to teach it, but by then VB.NET was here and I was amazed at the ease it presented itself to the potential user.

The IDE for VB.NET (2005) was very nice indeed. Quick and responsive with some useful debugging information. Perfect for students. The learning curve was short and results appeared rapidly. No fuss or mess, just a usable application. The problem with it - speed. VB.NET was slow....

C Sharp for me had humble beginnings. I've never been a big Windows user - in fact until I decided to learn ASP.NET MVC, I can say I've only ever used it when paid to use it.

Some time in 2003-ish, Ximian (who was later bought out by Novell) started work on an open source implementation of the .NET framework called Mono. This interested me as it meant that natively on my Linux box, I could create applications which I could then have people use on their Windows machines and in return, run .NET apps on my Linux box. Okay, there would be some bits which would not work (native calls to Windows only functions), true interoperability was becoming (albeit slowly) a reality.

Time moved on and my early VB.NET applications dragged. They were slow. The apps were not particularly big apps, but they dragged when being run. It is possible to convert VB.NET code in C# through the C# IDE (or at least I could when using the SharpDevelop IDE). A quick recompile and a few bug fixes later, the app was running and running MUCH quicker

What you'll find here

Quite a few bits and pieces that I'll share with you. All of the source code is available (released under the GPL v2) and should work happily under Mono 2.4 or .NET 2 upwards - so it should run on just about anything with the interpreter on it - just follow the links