ILGenerator Methods

The ILGenerator type exposes the following members.

  Name Description
Public method BeginCatchBlock Begins a catch block.
Public method BeginExceptFilterBlock Begins an exception block for a filtered exception.
Public method BeginExceptionBlock Begins an exception block for a non-filtered exception.
Public method BeginFaultBlock Begins an exception fault block in the Microsoft intermediate language (MSIL) stream.
Public method BeginFinallyBlock Begins a finally block in the Microsoft intermediate language (MSIL) instruction stream.
Public method BeginScope Begins a lexical scope.
Public method DeclareLocal(Type) Declares a local variable of the specified type.
Public method DeclareLocal(Type, Boolean) Declares a local variable of the specified type, optionally pinning the object referred to by the variable.
Public method DefineLabel Declares a new label.
Public method Emit(OpCode) Puts the specified instruction onto the stream of instructions.
Public method Emit(OpCode, Byte) Puts the specified instruction and character argument onto the Microsoft intermediate language (MSIL) stream of instructions.
Public method Emit(OpCode, Double) Puts the specified instruction and numerical argument onto the Microsoft intermediate language (MSIL) stream of instructions.
Public method Emit(OpCode, Int16) Puts the specified instruction and numerical argument onto the Microsoft intermediate language (MSIL) stream of instructions.
Public method Emit(OpCode, Int32) Puts the specified instruction and numerical argument onto the Microsoft intermediate language (MSIL) stream of instructions.
Public method Emit(OpCode, Int64) Puts the specified instruction and numerical argument onto the Microsoft intermediate language (MSIL) stream of instructions.
Public method Emit(OpCode, ConstructorInfo) Puts the specified instruction and metadata token for the specified constructor onto the Microsoft intermediate language (MSIL) stream of instructions.
Public method Emit(OpCode, Label) Puts the specified instruction onto the Microsoft intermediate language (MSIL) stream and leaves space to include a label when fixes are done.
Public method Emit(OpCode, Label[]) Puts the specified instruction onto the Microsoft intermediate language (MSIL) stream and leaves space to include a label when fixes are done.
Public method Emit(OpCode, LocalBuilder) Puts the specified instruction onto the Microsoft intermediate language (MSIL) stream followed by the index of the given local variable.
Public method Emit(OpCode, SignatureHelper) Puts the specified instruction and a signature token onto the Microsoft intermediate language (MSIL) stream of instructions.
Public method Emit(OpCode, FieldInfo) Puts the specified instruction and metadata token for the specified field onto the Microsoft intermediate language (MSIL) stream of instructions.
Public method Emit(OpCode, MethodInfo) Puts the specified instruction onto the Microsoft intermediate language (MSIL) stream followed by the metadata token for the given method.
Public method Emit(OpCode, SByte) Puts the specified instruction and character argument onto the Microsoft intermediate language (MSIL) stream of instructions.
Public method Emit(OpCode, Single) Puts the specified instruction and numerical argument onto the Microsoft intermediate language (MSIL) stream of instructions.
Public method Emit(OpCode, String) Puts the specified instruction onto the Microsoft intermediate language (MSIL) stream followed by the metadata token for the given string.
Public method Emit(OpCode, Type) Puts the specified instruction onto the Microsoft intermediate language (MSIL) stream followed by the metadata token for the given type.
Public method EmitCall Puts a call or callvirt instruction onto the Microsoft intermediate language (MSIL) stream to call a varargs method.
Public method EmitCalli(OpCode, CallingConvention, Type, Type[]) Puts a Calli instruction onto the Microsoft intermediate language (MSIL) stream, specifying an unmanaged calling convention for the indirect call.
Public method EmitCalli(OpCode, CallingConventions, Type, Type[], Type[]) Puts a Calli instruction onto the Microsoft intermediate language (MSIL) stream, specifying a managed calling convention for the indirect call.
Public method EmitWriteLine(FieldInfo) Emits the Microsoft intermediate language (MSIL) necessary to call Console.WriteLine with the given field.
Public method EmitWriteLine(LocalBuilder) Emits the Microsoft intermediate language (MSIL) necessary to call Console.WriteLine with the given local variable.
Public method EmitWriteLine(String) Emits the Microsoft intermediate language (MSIL) to call Console.WriteLine with a string.
Public method EndExceptionBlock Ends an exception block.
Public method EndScope Ends a lexical scope.
Public method Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method MarkLabel Marks the Microsoft intermediate language (MSIL) stream's current position with the given label.
Public method MarkSequencePoint Marks a sequence point in the Microsoft intermediate language (MSIL) stream.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ThrowException Emits an instruction to throw an exception.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method UsingNamespace Specifies the namespace to be used in evaluating locals and watches for the current active lexical scope.
Top

  Name Description
Explicit interface implemetation Private method _ILGenerator.GetIDsOfNames Maps a set of names to a corresponding set of dispatch identifiers.
Explicit interface implemetation Private method _ILGenerator.GetTypeInfo Retrieves the type information for an object, which can then be used to get the type information for an interface.
Explicit interface implemetation Private method _ILGenerator.GetTypeInfoCount Retrieves the number of type information interfaces that an object provides (either 0 or 1).
Explicit interface implemetation Private method _ILGenerator.Invoke Provides access to properties and methods exposed by an object.
Top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft