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"))

适用于

另请参阅