<PackageReference Include="Castle.Core" Version="3.3.0" />

OpCodeUtil

abstract class OpCodeUtil
protected OpCodeUtil()

public static void EmitLoadIndirectOpCodeForType(ILGenerator gen, Type type)

Emits a load indirect opcode of the appropriate type for a value or object reference. Pops a pointer off the evaluation stack, dereferences it and loads a value of the specified type.

public static void EmitLoadOpCodeForConstantValue(ILGenerator gen, object value)

Emits a load opcode of the appropriate kind for a constant string or primitive value.

Emits a load opcode of the appropriate kind for the constant default value of a type, such as 0 for value types and null for reference types.

public static void EmitStoreIndirectOpCodeForType(ILGenerator gen, Type type)

Emits a store indirectopcode of the appropriate type for a value or object reference. Pops a value of the specified type and a pointer off the evaluation stack, and stores the value.