Content deleted Content added
commenting out {{copy edit|date=June 2020}}; placing {{GOCEinuse|section=yes}} |
spacing throughout article |
||
Line 2:
{{confused|C Intermediate Language}}
{{refimprove|date=November 2017}}
'''Common Intermediate Language''' ('''CIL'''), formerly called '''Microsoft Intermediate Language''' ('''MSIL''') or '''Intermediate Language''' ('''IL'''),<ref>{{cite web |url = https://docs.microsoft.com/en-us/dotnet/standard/managed-code |title = Intermediate Language & execution}}</ref> is the [[intermediate language]] binary instruction set defined within the [[Common Language Infrastructure]] (CLI) specification.<ref>{{cite web |url = https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-335.pdf |page = 32 |title = ECMA-335 Common Language Infrastructure (CLI)}}</ref> CIL instructions are executed by a CLI-compatible runtime environment such as the [[Common Language Runtime]]. Languages which target the CLI compile to CIL. CIL is [[object-oriented]], [[Stack machine|stack-based]] [[bytecode]]. Runtimes typically [[Just-in-time compilation|just-in-time]] compile CIL instructions into [[native code]].
Line 14 ⟶ 15:
<ref> {{cite book| url = https://books.google.com/books?id=VGT1_UJzjM0C&pg=PA15&lpg=PA15&dq=CIL+is+platformindependent#v=onepage&q=CIL%20is%20platform-independent&f=false| title = Benefits of CIL| access-date = 2011-02-17| last1 = Troelsen| first1 = Andrew| date = 2009-05-02}}</ref>
<ref> {{cite web|url=https://www.visualcplusdotnet.com/visualcplusdotnet1.html|title=Unmanaged, Managed Extensions for C++, Managed and .Net Framework|website=www.visualcplusdotnet.com|access-date=2020-07-07}}</ref>
The execution process looks like this:
Line 91 ⟶ 90:
====Instance classes====
An instance class contains at least one constructor and some instance members. This class has a set of methods representing actions of a Car-object.
<syntaxhighlight lang="csharp">
Line 124 ⟶ 122:
====Creating objects====
In C# class instances are created like this:
<syntaxhighlight lang="csharp">
Line 144 ⟶ 141:
====Invoking instance methods====
Instance methods are invoked like the one that follows:
<syntaxhighlight lang="csharp">
Line 159 ⟶ 155:
===Metadata===
{{Main|Metadata (CLI)}}
CLI records information about compiled classes as [[Metadata]]. Like the type library in the [[Component Object Model]], this enables applications to support and discover the interfaces, classes, types, methods, and fields in the assembly. The process of reading such metadata is called ''[[Reflection (computer science)|reflection]]''.
|