IL系列文章之三:Array in IL[3]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 windfast_2000 的 blog

就够了。产生这种差异的缘由何在呢?别慌,马上就能看到。还有一点,c#中有foreach语句,这个语句与传统的for语句比较起来又如何呢?看下面,是上面的程序用ildasm反编译产生的(为了大家能看得更明白,我对反编译产生的il程序做了一些修改)。

 

.assembly array1{}

 

.class private auto ansi beforefieldinit array1

       extends [mscorlib]system.object

{

  .method public static void  main() cil managed

  {

    .entrypoint

    .maxstack  4

    .locals init (int32[] v_0,//int[] number

             int32 v_1,//i

             int32 v_2,

             int32[] v_3,//a pointer of array

             int32 v_4)

                   ldc.i4.6//load int32 const 6(length of the array) onto the stack

本文关键:il,cil,msil,array
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top