SignatureHelper.AddArguments(Type[], Type[][], Type[][]) 方法

定义

向签名添加具有指定自定义修饰符的一组参数。

public:
 void AddArguments(cli::array <Type ^> ^ arguments, cli::array <cli::array <Type ^> ^> ^ requiredCustomModifiers, cli::array <cli::array <Type ^> ^> ^ optionalCustomModifiers);
public void AddArguments (Type[]? arguments, Type[][]? requiredCustomModifiers, Type[][]? optionalCustomModifiers);
public void AddArguments (Type[] arguments, Type[][] requiredCustomModifiers, Type[][] optionalCustomModifiers);
member this.AddArguments : Type[] * Type[][] * Type[][] -> unit
Public Sub AddArguments (arguments As Type(), requiredCustomModifiers As Type()(), optionalCustomModifiers As Type()())

参数

arguments
Type[]

要添加的参数的类型。

requiredCustomModifiers
Type[][]

由类型数组组成的数组。 每个类型数组均表示相应参数所必需的自定义修饰符,例如 IsConstIsBoxed。 如果某个特定参数没有必需的自定义修饰符,请指定 null,而不要指定类型数组。 如果所有参数都没有必需的自定义修饰符,请指定 null,而不要指定由数组组成的数组。

optionalCustomModifiers
Type[][]

由类型数组组成的数组。 每个类型数组均表示相应参数的可选自定义修饰符,如 IsConstIsBoxed。 如果某个特定参数没有可选的自定义修饰符,请指定 null,而不要指定类型数组。 如果所有参数都没有可选的自定义修饰符,请指定 null,而不要指定由数组组成的数组。

例外

arguments 的元素为 null

- 或 -

其中一个指定的自定义修饰符为 null。 (但是,可为任何参数的自定义修饰符的数组指定 null。)

已完成签名。

- 或 -

指定的自定义修饰符之一为数组类型。

- 或 -

指定的自定义修饰符之一为开放式泛型类型。 也就是说,ContainsGenericParameters 属性对于自定义修饰符为 true

- 或 -

requiredCustomModifiersoptionalCustomModifiers 的大小与 arguments 的大小不相等。

注解

参数将按 的元素顺序添加到签名的 arguments末尾。

System.Runtime.CompilerServices请参阅表示自定义修饰符的类的命名空间。

适用于