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

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

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

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

Syntax

'Declaration
<SecuritySafeCriticalAttribute> _
Public Sub AddArgument ( _
    argument As Type, _
    requiredCustomModifiers As Type(), _
    optionalCustomModifiers As Type() _
)
[SecuritySafeCriticalAttribute]
public void AddArgument(
    Type argument,
    Type[] requiredCustomModifiers,
    Type[] optionalCustomModifiers
)

Parameters

  • requiredCustomModifiers
    Type: array<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 nulla null reference (Nothing in Visual Basic).
  • optionalCustomModifiers
    Type: array<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 nulla null reference (Nothing in Visual Basic).

Exceptions

Exception Condition
ArgumentNullException

argument is nulla null reference (Nothing in Visual Basic).

-or-

An element of requiredCustomModifiers or optionalCustomModifiers is nulla null reference (Nothing in Visual Basic).

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.

Remarks

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.