AddArgument Method (Type, Type[], Type[])
Collapse the table of content
Expand the table of content

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

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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

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

'Declaration
Public Sub AddArgument ( _
	argument As Type, _
	requiredCustomModifiers As Type(), _
	optionalCustomModifiers As Type() _
)

Parameters

argument
Type: System.Type
The argument type.
requiredCustomModifiers
Type: System.Type ()
An array of types representing the required custom modifiers for the argument. If the argument has no required custom modifiers, specify Nothing.
optionalCustomModifiers
Type: System.Type ()
An array of types representing the optional custom modifiers for the argument. If the argument has no optional custom modifiers, specify Nothing.

ExceptionCondition
ArgumentNullException

argument is Nothing.

-or-

An element of requiredCustomModifiers or optionalCustomModifiers is Nothing.

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.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft