다음을 통해 공유


MSIL Verification Notes - 7

Box operation can operate on ValueType but not all of them.

Below example is trying to box System.ArgIterator. ArgIterator can have pointer points to stack, therefor BOX it won't be verifiable.

       ()  {     8      (        []  [] args)    L_0000:      L_0004:      L_0006:    []::( [])    L_000b:      L_000f:  []    L_0014:  []    L_0019:    [] []::()    L_001e:      L_0023:      L_0024:   []::()    L_0029:  }
 Here is the PEVerify result.[IL]: Error: [xxx.exe : TestClass::VarArg][mdToken=0x6000001][offset 0x0000000F][found value 'System.ArgIterator'] Value type, ObjRef type or variable type expected.(Error: 0x801318C0)

Comments