What is MSIL ?

MSIL includes instructions for loading, storing, initializing, and calling methods on objects, as well as instructions for arithmetic and logical operations, control flow, direct memory access, exception handling, and other operations.
Common Type System in .Net Framework defines how data types are going to be declared and managed in runtime. The Common Type System performs the following functions:


• Establishes a framework that helps enable cross-language integration, type safety, and high performance code execution.
• Provides an object-oriented model.
• Defines rules that languages must follow, which helps ensure that objects written in different languages can interact with each other.
• Invokes security checks.
• Encapsulates data structures.
• Most languages use aliases to implement those types (Eg: C# implements int as alias for Int32).
  For example, an integer variable in C# is written as int, whereas in Visual Basic it is written as integer. Therefore in .Net Framework you have single class called System.Int32 to interpret these variables. Similarly, for the ArrayList data type .Net Framework has a common type called System.Collections.ArrayList. In .Net Framework, System.Object is the common base type from where all the other types are derived.
• CTS is categorized into two types called ValueTypes and ReferenceTypes.
• Set of Base Types is called CTS.
• Multiple Inheritance is not allowed in .NET and this can be treated as one of the rules.
• System.Object is a common base type where all other types are derived from.
• CTS is responsible for defining types that can be used across the .NET Languages.
• Variables that are Value Type have their own copy of the data.
• Value Types and Reference Types, all are derived from type called System.Object.
• CTS provide types that are available to be used by programs in .NET and CLS specifies how those types are to be used in a consistent manner to ensure compatibility with other languages.

0 comments:

Post a Comment