Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

MethodBuilder Methods

The MethodBuilder type exposes the following members.

  Name Description
Public method AddDeclarativeSecurity Adds declarative security to this method.
Public method CreateDelegate(Type) Creates a delegate of the specified type from this method. (Inherited from MethodInfo.)
Public method CreateDelegate(Type, Object) Creates a delegate of the specified type with the specified target from this method. (Inherited from MethodInfo.)
Public method CreateMethodBody Creates the body of the method using a supplied byte array of Microsoft intermediate language (MSIL) instructions.
Public method DefineGenericParameters Sets the number of generic type parameters for the current method, specifies their names, and returns an array of GenericTypeParameterBuilder objects that can be used to define their constraints.
Public method DefineParameter 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.
Public method Equals Determines whether the given object is equal to this instance. (Overrides MethodInfo.Equals(Object).)
Public method GetBaseDefinition Return the base implementation for a method. (Overrides MethodInfo.GetBaseDefinition().)
Public method GetCustomAttributes(Boolean) Returns all the custom attributes defined for this method. (Overrides MemberInfo.GetCustomAttributes(Boolean).)
Public method GetCustomAttributes(Type, Boolean) Returns the custom attributes identified by the given type. (Overrides MemberInfo.GetCustomAttributes(Type, Boolean).)
Public method GetCustomAttributesData Returns a list of CustomAttributeData objects representing data about the attributes that have been applied to the target member. (Inherited from MemberInfo.)
Public method GetGenericArguments Returns an array of GenericTypeParameterBuilder objects that represent the type parameters of the method, if it is generic. (Overrides MethodInfo.GetGenericArguments().)
Public method GetGenericMethodDefinition Returns this method. (Overrides MethodInfo.GetGenericMethodDefinition().)
Public method GetHashCode Gets the hash code for this method. (Overrides MethodInfo.GetHashCode().)
Public method GetILGenerator() Returns an ILGenerator for this method with a default Microsoft intermediate language (MSIL) stream size of 64 bytes.
Public method GetILGenerator(Int32) Returns an ILGenerator for this method with the specified Microsoft intermediate language (MSIL) stream size.
Public method GetMethodBody When overridden in a derived class, gets a MethodBody object that provides access to the MSIL stream, local variables, and exceptions for the current method. (Inherited from MethodBase.)
Public method GetMethodImplementationFlags Returns the implementation flags for the method. (Overrides MethodBase.GetMethodImplementationFlags().)
Public method GetModule Returns a reference to the module that contains this method.
Public method GetParameters Returns the parameters of this method. (Overrides MethodBase.GetParameters().)
Public method GetToken Returns the MethodToken that represents the token for this method.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Invoke(Object, Object[]) Invokes the method or constructor represented by the current instance, using the specified parameters. (Inherited from MethodBase.)
Public method Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) 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. (Overrides MethodBase.Invoke(Object, BindingFlags, Binder, Object[], CultureInfo).)
Public method IsDefined Checks if the specified custom attribute type is defined. (Overrides MemberInfo.IsDefined(Type, Boolean).)
Public method MakeGenericMethod Returns a generic method constructed from the current generic method definition using the specified generic type arguments. (Overrides MethodInfo.MakeGenericMethod(Type[]).)
Public method SetCustomAttribute(CustomAttributeBuilder) Sets a custom attribute using a custom attribute builder.
Public method SetCustomAttribute(ConstructorInfo, Byte[]) Sets a custom attribute using a specified custom attribute blob.
Public method SetImplementationFlags Sets the implementation flags for this method.
Public method SetMarshal Obsolete. Sets marshaling information for the return type of this method.
Public method SetMethodBody Creates the body of the method by using a specified byte array of Microsoft intermediate language (MSIL) instructions.
Public method SetParameters Sets the number and types of parameters for a method.
Public method SetReturnType Sets the return type of the method.
Public method SetSignature 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.
Public method SetSymCustomAttribute Set a symbolic custom attribute using a blob.
Public method ToString Returns this MethodBuilder instance as a string. (Overrides Object.ToString().)
Top
  Name Description
Public Extension Method GetCustomAttribute(Type) Overloaded. Retrieves a custom attribute of a specified type that is applied to a specified member. (Defined by CustomAttributeExtensions.)
Public Extension Method GetCustomAttribute(Type, Boolean) Overloaded. Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member. (Defined by CustomAttributeExtensions.)
Public Extension Method GetCustomAttribute<T>() Overloaded. Retrieves a custom attribute of a specified type that is applied to a specified member. (Defined by CustomAttributeExtensions.)
Public Extension Method GetCustomAttribute<T>(Boolean) Overloaded. Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member. (Defined by CustomAttributeExtensions.)
Public Extension Method GetCustomAttributes() Overloaded. Retrieves a collection of custom attributes that are applied to a specified member. (Defined by CustomAttributeExtensions.)
Public Extension Method GetCustomAttributes(Type) Overloaded. Retrieves a collection of custom attributes of a specified type that are applied to a specified member. (Defined by CustomAttributeExtensions.)
Public Extension Method GetCustomAttributes<T>() Overloaded. Retrieves a collection of custom attributes of a specified type that are applied to a specified member. (Defined by CustomAttributeExtensions.)
Public Extension Method GetCustomAttributes<T>(Boolean) Overloaded. Retrieves a collection of custom attributes of a specified type that are applied to a specified member, and optionally inspects the ancestors of that member. (Defined by CustomAttributeExtensions.)
Public Extension Method GetRuntimeBaseDefinition Retrieves an object that represents the specified method on the direct or indirect base class where the method was first declared. (Defined by RuntimeReflectionExtensions.)
Public Extension Method IsDefined Indicates whether custom attributes of a specified type are applied to a specified member. (Defined by CustomAttributeExtensions.)
Top
  Name Description
Explicit interface implemetation Private method _MemberInfo.GetIDsOfNames Maps a set of names to a corresponding set of dispatch identifiers. (Inherited from MemberInfo.)
Explicit interface implemetation Private method _MemberInfo.GetType Gets a Type object representing the MemberInfo class. (Inherited from MemberInfo.)
Explicit interface implemetation Private method _MemberInfo.GetTypeInfo Retrieves the type information for an object, which can then be used to get the type information for an interface. (Inherited from MemberInfo.)
Explicit interface implemetation Private method _MemberInfo.GetTypeInfoCount Retrieves the number of type information interfaces that an object provides (either 0 or 1). (Inherited from MemberInfo.)
Explicit interface implemetation Private method _MemberInfo.Invoke Provides access to properties and methods exposed by an object. (Inherited from MemberInfo.)
Explicit interface implemetation Private method _MethodBase.GetIDsOfNames Maps a set of names to a corresponding set of dispatch identifiers. (Inherited from MethodBase.)
Explicit interface implemetation Private method _MethodBase.GetType For a description of this member, see _MethodBase.GetType. (Inherited from MethodBase.)
Explicit interface implemetation Private method _MethodBase.GetTypeInfo Retrieves the type information for an object, which can then be used to get the type information for an interface. (Inherited from MethodBase.)
Explicit interface implemetation Private method _MethodBase.GetTypeInfoCount Retrieves the number of type information interfaces that an object provides (either 0 or 1). (Inherited from MethodBase.)
Explicit interface implemetation Private method _MethodBase.Invoke Provides access to properties and methods exposed by an object. (Inherited from MethodBase.)
Explicit interface implemetation Private method _MethodBuilder.GetIDsOfNames Maps a set of names to a corresponding set of dispatch identifiers.
Explicit interface implemetation Private method _MethodBuilder.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 _MethodBuilder.GetTypeInfoCount Retrieves the number of type information interfaces that an object provides (either 0 or 1).
Explicit interface implemetation Private method _MethodBuilder.Invoke Provides access to properties and methods exposed by an object.
Explicit interface implemetation Private method _MethodInfo.GetIDsOfNames Maps a set of names to a corresponding set of dispatch identifiers. (Inherited from MethodInfo.)
Explicit interface implemetation Private method _MethodInfo.GetType Provides access to the GetType method from COM. (Inherited from MethodInfo.)
Explicit interface implemetation Private method _MethodInfo.GetTypeInfo Retrieves the type information for an object, which can be used to get the type information for an interface. (Inherited from MethodInfo.)
Explicit interface implemetation Private method _MethodInfo.GetTypeInfoCount Retrieves the number of type information interfaces that an object provides (either 0 or 1). (Inherited from MethodInfo.)
Explicit interface implemetation Private method _MethodInfo.Invoke Provides access to properties and methods exposed by an object. (Inherited from MethodInfo.)
Top
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.