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)

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.

Exception Condition
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.

.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 8.0
Return to top
Show: