SignatureHelper.AddArgument Method (Type, Type[], Type[])

Adds an argument to the signature, with the specified custom modifiers.

Namespace:  System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

[SecuritySafeCriticalAttribute]
public void AddArgument(
	Type argument,
	Type[] requiredCustomModifiers,
	Type[] optionalCustomModifiers
)

Parameters

argument
Type: System.Type
The argument type.
requiredCustomModifiers
Type: System.Type[]
An array of types representing the required custom modifiers for the argument, such as IsConst or IsBoxed. If the argument has no required custom modifiers, specify null.
optionalCustomModifiers
Type: System.Type[]
An array of types representing the optional custom modifiers for the argument, such as IsConst or IsBoxed. If the argument has no optional custom modifiers, specify null.

ExceptionCondition
ArgumentNullException

argument is null.

-or-

An element of requiredCustomModifiers or optionalCustomModifiers is null.

ArgumentException

The signature has already been finished.

-or-

One of the specified custom modifiers is an array type.

-or-

One of the specified custom modifiers is an open generic type. That is, the Type.ContainsGenericParameters property is true for the custom modifier.

See the System.Runtime.CompilerServices namespace for classes that represent custom modifiers.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: