The .NET Framework provides an environment for creating, developing, and running web services and other applications. It consists of three different technologies:
- Common Language Runtime (CLR)
- Framework-based classes
- User interface program (ASP.NET and Winforms)
- CLR.
We can say that the CLR is the heart and soul of the .NET Framework. As the name suggests, the CLR provides the runtime environment in which programs written in C# and other .NET languages are executed. It also supports cross-language compatibility.
The CLR supports a number of the following services:
- Loading and executing a program
- Memory isolation for a program
- Type safety checking
- Compile IL into your own executable code
- Providing metadata
- Memory management (automatic garbage collection)
- Providing security
- Manage errors and exceptions
- Support for tasks such as debugging and profiling
- Interaction with other systems
- Common type system (CTS)
The .NET Framework provides support for multiple languages through features known as the Common Type System built into the CLR. CTS supports a variety of types and operations that can be found in most programming languages, so calling one language from another does not require type conversion. We can create a .NET application in several other languages, including C++ and Visual Basic.
Common Language Specification (CLS)
The CLS specification defines a set of rules that enable interoperability on the .NET platform. These rules guide third-party compiler developers and library developers. CLS is a subset of CTS, and therefore a language that supports CLS can use the class libraries of others as if they were its own.
Microsoft Intermediate Language (MSIL)
MSIL, simply called IL, is the instruction set that all .NET programs are compiled into. It is similar to assembly language and contains instructions for loading, saving, initializing, and calling methods. When we compile a C# program or any other program written in a CLS-compatible language, the code is compiled into MSIL.