Introduction to C# |
A complete PDF version of the text book is now available. The PDF version is an almost complete subset of the HTML version (where only a few, long program listings have been removed). See here. |
This chapter, together with Chapter 6, Chapter 7, and Chapter 9, is an introduction to the C# language and the C# system. On Windows, the latter is known as .Net. On purpose, we will keep the .Net part of the material very short. Our main interest in this lecture is how to program in C#, and how this is related to programming in other languages such as C, Java, and Visual Basic.
|
5.1. C# seen in a historic perspective
Contents Up Previous Next Slide Annotated slide Aggregated slides Subject index Program index Exercise index
It is important to realize that C# stands on the shoulders of other similar object-oriented programming languages. Most notably, C# is heavily inspired by Java. Java, in turn, is inspired by C++, which again - on the object-oriented side - can be traced back to Simula (and, of course, to C on the imperative side).
Here is an overview of the most important object-oriented programming languages from which C# has been derived:
|
5.2. The Common Language Infrastructure
Contents Up Previous Next Slide Annotated slide Aggregated slides Subject index Program index Exercise index
The Common Language Infrastructure (CLI) is a specification that allows several different programming languages to be used together on a given platform. The CLI has a lot of components, typically referred to by three-letter abbreviations (acronyms). Here are the most important parts of the Common Language Infrastructure:
|
The following illustration, taken from Wikipedia, illustrates the CLI and its context.
Figure 5.1 Wikipedia's overview diagram of the CLI |
.Net is one particular implementation of the Common Language Infrastructure, and it is undoubtedly the most complete one. .Net is closely associated with Windows. .Net is, however, not the only implementation of the CLI. Mono is another one, which is intended to work on several platforms. Mono is the primary implementation of the CLI on Linux. Mono is also available on Windows.
MONO and .NET are both implementations of the Common Language Infrastructure The C# language and the Common Language Infrastructure are standardized by ECMA and ISO |
5.3. C# Compilation and Execution
Contents Up Previous Next Slide Annotated slide Aggregated slides Subject index Program index Exercise index
The Common Language Infrastructure supports a two-step compilation process |
|
.dll and .exe files are - with some limitations - portable in between different platforms |