Пример #1
0
 internal IntConst(PEReader buff, int numBytes)
 {
     switch (numBytes) {
         case (1) : val = buff.ReadSByte();
             type = ElementType.I8;
             break;
         case (2) : val = buff.ReadInt16();
             type = ElementType.I2;
             break;
         case (4) : val = buff.ReadInt32();
             type = ElementType.I4;
             break;
         case (8) : val = buff.ReadInt64();
             type = ElementType.I8;
             break;
         default: val = 0;
             break;
     }
     size = (uint)numBytes; // * 4;
 }