CodeParameterDeclarationExpressionCollection.Add 方法

定義

將指定的 CodeParameterDeclarationExpression 資料加入集合。

public:
 int Add(System::CodeDom::CodeParameterDeclarationExpression ^ value);
public int Add(System.CodeDom.CodeParameterDeclarationExpression value);
member this.Add : System.CodeDom.CodeParameterDeclarationExpression -> int
Public Function Add (value As CodeParameterDeclarationExpression) As Integer

參數

傳回

新元素插入的索引。

範例

以下範例示範如何將物件加入CodeParameterDeclarationExpressionCodeParameterDeclarationExpressionCollection實例。

// Adds a CodeParameterDeclarationExpression to the collection.
collection.Add( new CodeParameterDeclarationExpression(typeof(int), "testIntArgument") );
' Adds a CodeParameterDeclarationExpression to the collection.
collection.Add(New CodeParameterDeclarationExpression(GetType(Integer), "testIntArgument"))

適用於

另請參閱