By Vijay Mukhi
The .NET languages are growing more pervasive by each passing day. We, therefore decided to explore the world of Intermediate Language (IL), a language to which all the source code written in various languages such as C#, COBOL etc. get compiled. IL represents the transient stage in the process of conversion of source code into machine language. It is inescapably imperative to gain mastery over IL, because knowledge of IL translates into competence over IL code that may have originally been written in any programming language. Thus, it provides a common platform to all the programming languages. Realising its importance in the scheme of things in the .NET world, we decided to get under the skin of IL and unravel its mysteries.
IL puts an end to the unending dissidence amongst programmers with regard to the superiority of one programming language over the others. To this end, IL is a great leveller. It is also a stupendous facilitator because, in the .NET world, one part of the code may have been written in COBOL, while another may have been written in C#, but it all eventually gets converted into IL. This provides great freedom and flexibility to a programmer to select the language he/she is most familiar with and does away with the need to constantly retrain oneslf to learn new languages that seem to crop up every other day.
Our modus operandi has been to strip the sheen of complexity surrounding IL by presenting complex concepts in a simple and comprehensible manner. These concepts have been corroborated with lucid examples. We have put into service all the powers of clairvoyance at our disposal to discover and illustrate concepts of IL, that are not readily discernible to the layman.
To facilitate the understanding of the sample programs, in every example, we have first presented the source code of the programs in the C# language, and then, we have offered their equivalent IL code. Thereafter, we have applied reverse engineering to fathom the IL code by unravelling the equivalent C# code. We have demonstrated how, in some cases, IL transcends the limitations of conventional programming languages; while in others, it falls awfully short of expectations. Though we don't expect undue approbation, it would not be immodest to mention that, while working with the Beta version of IL, we have unearthed many undocumented features and lacunae, which we have highlighted in the book for your benefit.
To conclude, it can be stated that the aim of this book is to explain the various nuances of IL and to make you adept at understanding IL code. It is also our desire to alleviate your fear of lower level languages. The lure of IL lies in its simplicity coupled with its tremendous power, which makes an intoxicating cocktail. But, don't be beguiled by the apparant simplicity of the examples. We don't expect an acquiescent attitude from you. Instead, we implore you to try out all the examples by yourelf and ascertain their outcome. Thus, don't stand ruminating at the brink of this exciting sea of knowledge. Dive right in! We assure you that you shall come out a winner at the end of this sojourn into the world of IL
IL puts an end to the unending dissidence amongst programmers with regard to the superiority of one programming language over the others. To this end, IL is a great leveller. It is also a stupendous facilitator because, in the .NET world, one part of the code may have been written in COBOL, while another may have been written in C#, but it all eventually gets converted into IL. This provides great freedom and flexibility to a programmer to select the language he/she is most familiar with and does away with the need to constantly retrain oneslf to learn new languages that seem to crop up every other day.
Our modus operandi has been to strip the sheen of complexity surrounding IL by presenting complex concepts in a simple and comprehensible manner. These concepts have been corroborated with lucid examples. We have put into service all the powers of clairvoyance at our disposal to discover and illustrate concepts of IL, that are not readily discernible to the layman.
To facilitate the understanding of the sample programs, in every example, we have first presented the source code of the programs in the C# language, and then, we have offered their equivalent IL code. Thereafter, we have applied reverse engineering to fathom the IL code by unravelling the equivalent C# code. We have demonstrated how, in some cases, IL transcends the limitations of conventional programming languages; while in others, it falls awfully short of expectations. Though we don't expect undue approbation, it would not be immodest to mention that, while working with the Beta version of IL, we have unearthed many undocumented features and lacunae, which we have highlighted in the book for your benefit.
To conclude, it can be stated that the aim of this book is to explain the various nuances of IL and to make you adept at understanding IL code. It is also our desire to alleviate your fear of lower level languages. The lure of IL lies in its simplicity coupled with its tremendous power, which makes an intoxicating cocktail. But, don't be beguiled by the apparant simplicity of the examples. We don't expect an acquiescent attitude from you. Instead, we implore you to try out all the examples by yourelf and ascertain their outcome. Thus, don't stand ruminating at the brink of this exciting sea of knowledge. Dive right in! We assure you that you shall come out a winner at the end of this sojourn into the world of IL