Common Intermediate Language: Difference between revisions

Content deleted Content added
Computational model: changing IL linkage
Computational model: copy editing
Line 56:
</syntaxhighlight>
 
In the latter example, the values of the two registers, eax and edx, are first pushed on the stack. When the add-instruction is called the operands are "popped", or retrieved, and the result is "pushed", or stored, on the stack. The resulting value is then popped from the stack and stored in eax.
 
===Object-oriented concepts===
ThisCIL extendsis designed to be object-oriented concepts as well. You may create objects, call methods, and use other types of members, such as fields.
 
CIL is designed to be object-oriented and everyEvery [[Method (programming)|method]] needs (with some exceptions) to reside in a class. So does this static method:
<syntaxhighlight lang="csharp">
.class public Foo