SignatureHelper.AddArguments Method

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

Adds a set of arguments to the signature, with the specified custom modifiers.

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

Syntax

'Declaration
Public Sub AddArguments ( _
    arguments As Type(), _
    requiredCustomModifiers As Type()(), _
    optionalCustomModifiers As Type()() _
)
public void AddArguments(
    Type[] arguments,
    Type[][] requiredCustomModifiers,
    Type[][] optionalCustomModifiers
)

Parameters

  • arguments
    Type: array<System.Type[]
    The types of the arguments to be added.
  • requiredCustomModifiers
    Type: array<array<System.Type[][]
    An array of arrays of types. Each array of types represents the required custom modifiers for the corresponding argument, such as IsConst or IsBoxed. If a particular argument has no required custom modifiers, specify nulla null reference (Nothing in Visual Basic) instead of an array of types. If none of the arguments have required custom modifiers, specify nulla null reference (Nothing in Visual Basic) instead of an array of arrays.
  • optionalCustomModifiers
    Type: array<array<System.Type[][]
    An array of arrays of types. Each array of types represents the optional custom modifiers for the corresponding argument, such as IsConst or IsBoxed. If a particular argument has no optional custom modifiers, specify nulla null reference (Nothing in Visual Basic) instead of an array of types. If none of the arguments have optional custom modifiers, specify nulla null reference (Nothing in Visual Basic) instead of an array of arrays.

Exceptions

Exception Condition
ArgumentNullException

An element of arguments is nulla null reference (Nothing in Visual Basic).

-or-

One of the specified custom modifiers is nulla null reference (Nothing in Visual Basic). (However, nulla null reference (Nothing in Visual Basic) can be specified for the array of custom modifiers for any argument.)

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.

-or-

The size of requiredCustomModifiers or optionalCustomModifiers does not equal the size of arguments.

Remarks

The arguments are added to the end of the signature, in order of the elements of arguments.

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

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

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