MethodBuilder
Defines and represents a method (or constructor) on a dynamic class.
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.
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 ParameterBuilder DefineParameter(int position, ParameterAttributes attributes, string strParamName)
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.
Returns an ILGenerator for this method with a default Microsoft intermediate language (MSIL) stream size of 64 bytes.
Returns an ILGenerator for this method with the specified Microsoft intermediate language (MSIL) stream size.
Sets a custom attribute using a specified custom attribute blob.
Sets a custom attribute using a custom attribute builder.
Sets the implementation flags for this method.
Sets the number and types of parameters for a method.
Sets the return type of the method.
public void SetSignature(Type returnType, Type[] returnTypeRequiredCustomModifiers, Type[] returnTypeOptionalCustomModifiers, Type[] parameterTypes, Type[][] parameterTypeRequiredCustomModifiers, Type[][] parameterTypeOptionalCustomModifiers)
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.