SignatureHelper.AddArgument 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在簽名後加上一個參數。
多載
| 名稱 | Description |
|---|---|
| AddArgument(Type) |
在簽名後加上一個參數。 |
| AddArgument(Type, Boolean) |
在簽章中加入指定類型的參數,指定該參數是否被釘選。 |
| AddArgument(Type, Type[], Type[]) |
在簽名中加入參數,並使用指定的自訂修飾符。 |
AddArgument(Type)
在簽名後加上一個參數。
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)
在簽章中加入指定類型的參數,指定該參數是否被釘選。
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[])
在簽名中加入參數,並使用指定的自訂修飾符。
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
爭吵的類型。
例外狀況
argument 是 null。
-或-
或 requiredCustomModifiers 的optionalCustomModifiers元素是 null。
簽名已經完成。
-或-
其中一個指定的自訂修飾符是陣列類型。
-或-
其中一個指定的自訂修飾符是開放的通用型態。 也就是說,這個 ContainsGenericParameters 屬性是 true 為自訂修飾符設計的。
備註
請參考 System.Runtime.CompilerServices 代表自訂修飾符的類別命名空間。