OpCodes.Prefix1 Field
.NET Framework 4
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
This is a reserved instruction.
Assembly: mscorlib (in mscorlib.dll)
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Actual use of this opcode
This OpCode is actually not reserved; it indicates that this is a two-byte OpCode, and that the first byte read is the high byte. For example:
$0$0
$0
$0short ReadOpCodeValue(BinaryReader reader) {$0
$0short opCodeValue = reader.ReadByte();$0
$0$0
$0
$0if(opCodeValue == OpCodes.Prefix1.Value)$0
$0return (short)(opCodeValue * 256 + reader.ReadByte());$0
$0return opCodeValue;$0
$0}$0
$0$0
This is used for some special or uncommon OpCodes like "ldftn" or "ldloc" ("ldloc.s" being far more common). Some sources use code that includes "prefixref" as being another start to a two-byte OpCode, but it's not used in anything listed in OpCodes as such so that's not dependable.$0
$0$0
$0
$0Sorry about the formatting and any weird symbols, MSDN it seems doesn't like Chrome.$0
- 5/27/2012
- Burton-Radons
- 5/27/2012
- Burton-Radons