System.Reflection.Emit.MethodBuilder: Method Members

The methods of System.Reflection.Emit.MethodBuilder are listed below. For a list of all members, see the MethodBuilder Members list.

See Also: Inherited members from System.Reflection.MethodInfo

Public Methods

AddDeclarativeSecurity(System.Security.Permissions.SecurityAction, System.Security.PermissionSet)

Adds declarative security to this method.

CreateMethodBody(byte[], int)

Creates the body of the method using a supplied byte array of Microsoft intermediate language (MSIL) instructions.

DefineGenericParameters(params string[]) : GenericTypeParameterBuilder[]

Sets the number of generic type parameters for the current method, specifies their names, and returns an array of System.Reflection.Emit.GenericTypeParameterBuilder objects that can be used to define their constraints.

DefineParameter(int, System.Reflection.ParameterAttributes, string) : ParameterBuilder

Sets the parameter attributes and the name of a parameter of this method, or of the return value of this method. Returns a ParameterBuilder that can be used to apply custom attributes.

override
Equals(object) : bool

Determines whether the given object is equal to this instance.

override
GetBaseDefinition() : System.Reflection.MethodInfo

Return the base implementation for a method.

override
GetCustomAttributes(bool) : object[]

Returns all the custom attributes defined for this method.

override
GetCustomAttributes(Type, bool) : object[]

Returns the custom attributes identified by the given type.

override
GetGenericArguments() : Type[]

Returns an array of System.Reflection.Emit.GenericTypeParameterBuilder objects that represent the type parameters of the method, if it is generic.

override
GetGenericMethodDefinition() : System.Reflection.MethodInfo

Returns this method.

override
GetHashCode() : int

Gets the hash code for this method.

GetILGenerator() : ILGenerator

Returns an ILGenerator for this method with a default Microsoft intermediate language (MSIL) stream size of 64 bytes.

GetILGenerator(int) : ILGenerator

Returns an ILGenerator for this method with the specified Microsoft intermediate language (MSIL) stream size.

override
GetMethodImplementationFlags() : System.Reflection.MethodImplAttributes

Returns the implementation flags for the method.

GetModule() : System.Reflection.Module

Returns a reference to the module that contains this method.

override
GetParameters() : System.Reflection.ParameterInfo[]

Returns the parameters of this method.

GetToken() : MethodToken

Returns the MethodToken that represents the token for this method.

override
Invoke(object, System.Reflection.BindingFlags, System.Reflection.Binder, object[], System.Globalization.CultureInfo) : object

Dynamically invokes the method reflected by this instance on the given object, passing along the specified parameters, and under the constraints of the given binder.

override
IsDefined(Type, bool) : bool

Checks if the specified custom attribute type is defined.

override
MakeGenericMethod(params Type[]) : System.Reflection.MethodInfo

Returns a generic method constructed from the current generic method definition using the specified generic type arguments.

SetCustomAttribute(CustomAttributeBuilder)

Sets a custom attribute using a custom attribute builder.

SetCustomAttribute(System.Reflection.ConstructorInfo, byte[])

Sets a custom attribute using a specified custom attribute blob.

SetImplementationFlags(System.Reflection.MethodImplAttributes)

Sets the implementation flags for this method.

SetMarshal(UnmanagedMarshal)

Sets marshaling information for the return type of this method.

SetParameters(params Type[])

Sets the number and types of parameters for a method.

SetReturnType(Type)

Sets the return type of the method.

SetSignature(Type, Type[], Type[], Type[], Type[][], Type[][])

Sets the method signature, including the return type, the parameter types, and the required and optional custom modifiers of the return type and parameter types.

SetSymCustomAttribute(string, byte[])

Set a symbolic custom attribute using a blob.

override
ToString() : string

Returns this MethodBuilder instance as a string.