| • Science | • People | • Locations | • Timeline |
| Contents | ||
C# (pronounced see-sharp) is an object-oriented programming language developed by Microsoft as part of their .NET initiative. Microsoft based C# on C++ and the Java programming language. C# was designed to balance power (the C++ influence) with rapid development (the Visual Basic and Java influences).
The Microsoft C# compiler does not compile to object code which can be executed directly by the target computer. Instead, it is compiled to an intermediate representation. This form consists of metadata and instructions based upon a stack-based virtual machine. All .NET language compilers (which includes Visual Basic .NET, Managed C++, Delphi 8.Net as well as C#) compile to this intermediary code called Common Intermediate Language (CIL). To the casual observer the resulting program looks like a normal WindowsImage use policy. Microsoft Windows is a range of commercial operating environments for personal computers. The range was first introduced by Microsoft in 1985 and eventually has come to dominate the world personal computer market. All recent versions of executable and has an ".exe" extension just like a normal application (code librariesIn computer science, a library is a collection of subprograms used to develop software. Libraries are distinguished from executables in that they are not independent programs; rather, they are "helper" code that provides services to some other independent have the standard ".dll" extension). This is because the executable loader in Windows XP recognises the CIL executable and passes control to the .NET virtual machine. On older operating systems, the CIL executable has a native bootstrapperBootstrapping alludes to a German legend about a man who was able to fly by pulling himself up by his bootstraps. In computers, this term refers to any process where a simple system activates a more complicated system. It is the problem of starting a cert that runs the .NET virtual machine on that assembly.
When the program is executed, the .NET CLR ( Common Language RuntimeIn computing, Common Language Runtime (CLR) is a runtime environment enabling the exact same code called Common Intermediate Language to run on various computers such as Windows PCs, Unix machines and Macintoshes. Microsoft's. NET implementation of the st) compiles the intermediate code into binary code as it is run— just-in-time compilation (JIT). The resulting binary code is stored temporarily (in a memory cache), so if the program uses that portion of code again, the cached version is used. However this is only in effect during the runtime of the program. If a .NET application is run again, this compilation process is done again. The performance of a .NET program can be improved by precompiling the intermediate code to native code using a native code generator utility, but the .NET framework must still be installed for execution.
In addition to compiling intermediate code at runtime, the CLR provides other services. Security mechanisms are built into the CLR so that programs from a low trust source can still be run, with an attempt to limit their permissions. Remoting allows a program to execute code on a different computer over a network. Because code from all .NET languages is compiled to the same intermediate language CIL, code written in different .NET languages can interoperate with no loss in performance.