Share via


CodeCatchClauseCollection.Add(CodeCatchClause) 方法

定義

將指定的 CodeCatchClause 物件加入至集合。

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

參數

value
CodeCatchClause

要加入的 CodeCatchClause 物件。

傳回

要插入新項目的索引。

範例

下列範例示範如何將 物件新增 CodeCatchClauseCodeCatchClauseCollection 實例。

// Adds a CodeCatchClause to the collection.
collection->Add( gcnew CodeCatchClause( "e" ) );
// Adds a CodeCatchClause to the collection.
collection.Add( new CodeCatchClause("e") );
' Adds a CodeCatchClause to the collection.
collection.Add(New CodeCatchClause("e"))

適用於

另請參閱