il code swtich】的更多相关文章

public enum RangeItemType { CompanyPicker = 1, //公司STR_COMPANY BrDivPicker = 2, //分行STR_BRDIV DepartPicker = 3, //部门STR_DEPARTMENT SectionPicker = 4, //科组STR_SECTION PositionPicker = 5, //职位STR_POSITION CategoryPicker = 6, //级别STR_CATEGORY StaffPicke…
An array is a contiguous block of memory that stores values of the same type. These valuesare an indexed collection. The runtime has built in support to handle arrays. Vector isanother name for an array that has only one dimension and the index count…
Exception handling in IL is a big let down. We expected a significant amount of complexity,but were proved wrong, right from the beginning. IL cannot be termed as a machine levelassembler. It actually has a number of directives like try and catch, th…
The code of a data type is implemented by a method, which is executed by the ExecutionEngine. The CLR offers a large number of services to support the execution of code.Any code that uses these services is called managed code. Managed code allows the…
An interface is a reference type, in spite of the fact that it has no code at all. Thus, wecannot instantiate an interface. We can use it as a construct for the creation of new types.An interface defines a contract that is left to the class to implem…
Every operator overload that we use in C#, gets converted to a function call in IL. Theoverloaded > operator translates into the function op_GreaterThan and a + gets convertedto op_Addition etc. In the first program of this chapter, we have overloade…
Code that is placed after the return statement never gets executed. In the first programgiven below, you will notice that there is a WriteLine function call in C# but is not visible inour IL code. This is because the compiler is aware that any statem…
In IL, a label is a name followed by the colon sign i.e ":". It gives us the ability to jump fromone part of the code to another, unconditionally. We have been constantly witnessing thelabels in the il code generated by the disassembler. For e.g…
This chapter and the next couple of them will focus on and elicit a simple belief of ours,that if you really want to understand C# code in earnest, then the best way of doing so isby understanding the IL code generated by the C# compiler.So, we shall…
The code that we write in a programming language like C#, ASP+ or in any other .NETcompatible language is finally converted to either Assembler or Intermediate Language (IL).Thus, code written in the COBOL Programming Language can be modified in C# a…