System.Reflection.Emit.MethodBuilder.GetILGenerator C# (CSharp) Method

GetILGenerator() public method

public GetILGenerator ( ) : System.Reflection.Emit.ILGenerator
return System.Reflection.Emit.ILGenerator
        public System.Reflection.Emit.ILGenerator GetILGenerator() { throw null; }
        public System.Reflection.Emit.ILGenerator GetILGenerator(int size) { throw null; }

Same methods

MethodBuilder::GetILGenerator ( int size ) : System.Reflection.Emit.ILGenerator

Usage Example

Esempio n. 1
0
 public override void Gen(TypeBuilder program, MethodBuilder method)
 {
     AstNode left = this.child;
     AstNode right = left.sibling;
     left.Gen(program, method);
     right.Gen(program, method);
     if (this.symbol == "+") {
         method.GetILGenerator().EmitCall(OpCodes.Callvirt, typeof(TypeBase).GetMethod("Add"), new Type[] { typeof(TypeBase) });
     } else if (this.symbol == "-") {
         method.GetILGenerator().EmitCall(OpCodes.Callvirt,typeof(TypeBase).GetMethod("Minus"), new Type[] { typeof(TypeBase) });
     }
 }
All Usage Examples Of System.Reflection.Emit.MethodBuilder::GetILGenerator