MethodBuilder Methods

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Include Protected Members
Include Inherited Members

Include Silverlight Members
Include Silverlight for Windows Phone Members
Include XNA Framework Members

The MethodBuilder type exposes the following members.

Methods

  Name Description
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 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 Object.Equals(Object).)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public method GetBaseDefinition Returns 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 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 Object.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 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, array<Object[]) Invokes the method or constructor represented by the current instance, using the specified parameters. (Inherited from MethodBase.)
Public method Invoke(Object, BindingFlags, Binder, array<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, array<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(array<Type[]).)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method SetCustomAttribute Sets a custom attribute using a custom attribute builder.
Public method SetImplementationFlags Sets the implementation flags for this method.
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 ToString Returns this MethodBuilder instance as a string. (Overrides Object.ToString().)

Top