这里有对IL码的详细介绍:
ms-help://MS.VSCC/MS.MSDNVS.2052/cpref/html/frlrfSystemReflectionEmitOpCodesFieldsTopic.htm.method public hidebysig newslot virtual 
        instance int32  Add(object 'value') cil managed
{
  // Code size       76 (0x4c)
  .maxstack  3 //方法内所用到的最大stack大小的声明
  .locals (int32 V_0) //局部变量列表
  IL_0000:  ldarg.0 //this
  IL_0001:  ldfld      int32 System.Collections.ArrayList::_size //._size
  IL_0006:  ldarg.0 //this
  IL_0007:  ldfld      object[] System.Collections.ArrayList::_items //._items
  IL_000c:  ldlen //.Length
  IL_000d:  conv.i4 //(int)
  IL_000e:  bne.un.s   IL_001e // 如果 != 那么 跳转到 IL_001e
  IL_0010:  ldarg.0 //this
  IL_0011:  ldarg.0 //this
  IL_0012:  ldfld      int32 System.Collections.ArrayList::_size //._size
  IL_0017:  ldc.i4.1 //1
  IL_0018:  add //+
  IL_0019:  call       instance void System.Collections.ArrayList::EnsureCapacity(int32) //.EnsureCapacity
  IL_001e:  ldarg.0 //this
  IL_001f:  ldfld      object[] System.Collections.ArrayList::_items //._items
  IL_0024:  ldarg.0 //this
  IL_0025:  ldfld      int32 System.Collections.ArrayList::_size //._size
  IL_002a:  ldarg.1 //value
  IL_002b:  stelem.ref //[?]=ref
  IL_002c:  ldarg.0 //this
  IL_002d:  dup //this (复制前一项stack,也就是上面的ldarg.0的值this
  IL_002e:  ldfld      int32 System.Collections.ArrayList::_version //._version
  IL_0033:  ldc.i4.1 //1
  IL_0034:  add //+
  IL_0035:  stfld      int32 System.Collections.ArrayList::_version //._versiion=
  IL_003a:  ldarg.0 //this
  IL_003b:  dup //this 同上
  IL_003c:  ldfld      int32 System.Collections.ArrayList::_size //._size
  IL_0041:  dup //._size
  IL_0042:  stloc.0 //V_0=
  IL_0043:  ldc.i4.1 //1
  IL_0044:  add //+
  IL_0045:  stfld      int32 System.Collections.ArrayList::_size //._size=
  IL_004a:  ldloc.0 //V_0
  IL_004b:  ret //return
} // end of method ArrayList::Add翻译出来后:
public virtual int Add(object value) //Array
{
if(this._size==(int)this._items.Length)
{
this.EnsureCapacity(this._size+1);
}
this._items[this._size]=value;
this._version+=1;
return this._size++;//返回index,老的_size,新的_size-1
}