語言

SignatureHelper.AddArgument 方法

定義

在簽名後加上一個參數。

多載

名稱 Description
AddArgument(Type)

在簽名後加上一個參數。

AddArgument(Type, Boolean)

在簽章中加入指定類型的參數,指定該參數是否被釘選。

AddArgument(Type, Type[], Type[])

在簽名中加入參數,並使用指定的自訂修飾符。

AddArgument(Type)

來源:
SignatureHelper.cs
來源:
SignatureHelper.cs
來源:
SignatureHelper.cs
來源:
SignatureHelper.cs
來源:
SignatureHelper.cs

在簽名後加上一個參數。

public:
 void AddArgument(Type ^ clsArgument);
public void AddArgument(Type clsArgument);
member this.AddArgument : Type -> unit
Public Sub AddArgument (clsArgument As Type)

參數

clsArgument
Type

爭吵的類型。

例外狀況

簽名已經完成。

clsArgument 是 null。

備註

若要新增可選或必需的自訂修飾符參數,請使用 AddArgument(Type, Type[], Type[]) method overload。

適用於

AddArgument(Type, Boolean)

來源:
SignatureHelper.cs
來源:
SignatureHelper.cs
來源:
SignatureHelper.cs
來源:
SignatureHelper.cs
來源:
SignatureHelper.cs

在簽章中加入指定類型的參數,指定該參數是否被釘選。

public:
 void AddArgument(Type ^ argument, bool pinned);
public void AddArgument(Type argument, bool pinned);
member this.AddArgument : Type * bool -> unit
Public Sub AddArgument (argument As Type, pinned As Boolean)

參數

argument
Type

爭吵的類型。

pinned
Boolean

true如果論點被釘住;否則,。 false

例外狀況

argument 是 null。

備註

若要新增可選或必需的自訂修飾符參數,請使用 AddArgument(Type, Type[], Type[]) method overload。

適用於

AddArgument(Type, Type[], Type[])

來源:
SignatureHelper.cs
來源:
SignatureHelper.cs
來源:
SignatureHelper.cs
來源:
SignatureHelper.cs
來源:
SignatureHelper.cs

在簽名中加入參數,並使用指定的自訂修飾符。

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

參數

argument
Type

爭吵的類型。

requiredCustomModifiers
Type[]

一組型別陣列代表參數所需的自訂修飾符,例如 IsConstIsBoxed或 。 如果參數沒有必要的自訂修飾符,則指定 null。

optionalCustomModifiers
Type[]

一組代表參數可選自訂修飾符的型別陣列,例如 IsConst 或 IsBoxed。 若參數無可選自訂修飾符,則指定 null。

例外狀況

argument 是 null。

-或-

或 requiredCustomModifiers 的optionalCustomModifiers元素是 null。

簽名已經完成。

-或-

其中一個指定的自訂修飾符是陣列類型。

-或-

其中一個指定的自訂修飾符是開放的通用型態。 也就是說,這個 ContainsGenericParameters 屬性是 true 為自訂修飾符設計的。

備註

請參考 System.Runtime.CompilerServices 代表自訂修飾符的類別命名空間。

適用於