System.Reflection.Emit.MethodBuilder Members

The members of System.Reflection.Emit.MethodBuilder are listed below.

See Also: Inherited members from System.Reflection.MethodInfo

Public Properties

[read-only]
override
AttributesSystem.Reflection.MethodAttributes.

Retrieves the attributes for this method.

[read-only]
override
CallingConventionSystem.Reflection.CallingConventions.

Returns the calling convention of the method.

[read-only]
override
ContainsGenericParametersbool.

Not supported for this type.

[read-only]
override
DeclaringTypeType.

Returns the type that declares this method.

InitLocalsbool.

Gets or sets a Boolean value that specifies whether the local variables in this method are zero initialized. The default value of this property is true.

[read-only]
override
IsGenericMethodbool.

Gets a value indicating whether the method is a generic method.

[read-only]
override
IsGenericMethodDefinitionbool.

Gets a value indicating whether the current System.Reflection.Emit.MethodBuilder object represents the definition of a generic method.

[read-only]
override
MethodHandleRuntimeMethodHandle.

Retrieves the internal handle for the method. Use this handle to access the underlying metadata handle.

[read-only]
override
ModuleSystem.Reflection.Module.

Gets the module in which the current method is being defined.

[read-only]
override
Namestring.

Retrieves the name of this method.

[read-only]
override
ReflectedTypeType.

Retrieves the class that was used in reflection to obtain this object.

[read-only]
override
ReturnParameterSystem.Reflection.ParameterInfo.

Gets a System.Reflection.ParameterInfo object that contains information about the return type of the method, such as whether the return type has custom modifiers.

[read-only]
override
ReturnTypeType.

Gets the return type of the method represented by this System.Reflection.Emit.MethodBuilder.

[read-only]
override
ReturnTypeCustomAttributesSystem.Reflection.ICustomAttributeProvider.

Returns the custom attributes of the method's return type.

[read-only]
Signaturestring.

Retrieves the signature of the method.

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.

Explicitly Implemented Interface Members

System.Runtime.InteropServices._MethodBuilder.GetIDsOfNamesDocumentation for this section has not yet been entered.
System.Runtime.InteropServices._MethodBuilder.GetTypeInfo

Retrieves the type information for an object, which can then be used to get the type information for an interface.

System.Runtime.InteropServices._MethodBuilder.GetTypeInfoCountDocumentation for this section has not yet been entered.
System.Runtime.InteropServices._MethodBuilder.InvokeDocumentation for this section has not yet been entered.