.Net basics and C#No Comments
Last week I had a meeting with a Microsoft MVP, Martin Salias, in which he gave me an introductory explanation to the technologies I’m going to start using in Southworks. I’m very happy to be able to start my technical training with such a person, and I’ll make sure to put everything he teaches me to good use.
He went over some history about the .Net Platform, and its role as an infrastructure that makes it possible to develop scalable, multi-platform applications in a variety of languages. The most remarkable features of the .Net Platform are the Common Language Runtime (CLR), and the Common Intermediate Language (CIL, formerly known as Microsoft Intermediate Language, MSIL).
Common Intermediate Language
It has been mentioned that .Net supports a variety of languages, such as C#, C++, Visual Basic.Net, and so forth; but in order to maintain interoperability, all the compilers of .Net applications related to any of these supported languages compile into a form of bytecode, which is in fact the CIL. It is the lowest level human readable code in the .Net Platform, and it can be thought of as a “generic” assembly-like code.
Common Language Runtime
Based on the Common Language Infrastructure, the CLR is a virtual machine that compiles the CIL code into native code, before actually running the program, or even progressively during runtime (which is known as Just In Time compiling). This step is important, because it allows the software developed in the .Net platform to be highly platform-independent. Not only programs written in different languages interact within the same environment as if they were written in the same language, but also a .Net based program can run in any device supporting the CLR, no matter which platform it was compiled in. In other words, .Net compilers create .exe and .dll files that look like normal compiled files, but the actual conversion into native code is done on the device that runs the program.
Base Class Library
The main purpose of supporting multiple languages in the .Net platform is for long time programmers to avoid abandoning the syntax and customs of the language they had been using for so long. So in this context, there is a large library of classes known as .Net Framework Class Libraries or just simply Base Class library (BCL), that nowadays groups most of the functionality of the .Net platform, and can be accessed by any .Net supported language. So now, the main difference between the several languages is just the syntax.
In this context, C# is intended to be a simple, multi-purpose language that is greatly adapted to the .Net specifications and libraries, and is able to provide an interface to most of the .Net functionality. For example, C# doesn’t even have the capability of outputing text to the console, as this is comprised in the BCL.
I’m eager to keep studying this and I’ll post again as soon as I have learnt something interesting on the subject!
Leave a comment
Your email address will not be published.