CodeCatchClauseCollection.AddRange 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将指定 CodeCatchClause 数组的元素复制到集合的末尾。
重载
| 名称 | 说明 |
|---|---|
| AddRange(CodeCatchClause[]) |
将指定 CodeCatchClause 数组的元素复制到集合的末尾。 |
| AddRange(CodeCatchClauseCollection) |
将另一个 CodeCatchClauseCollection 对象的内容复制到集合的末尾。 |
AddRange(CodeCatchClause[])
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
将指定 CodeCatchClause 数组的元素复制到集合的末尾。
public:
void AddRange(cli::array <System::CodeDom::CodeCatchClause ^> ^ value);
public void AddRange(System.CodeDom.CodeCatchClause[] value);
member this.AddRange : System.CodeDom.CodeCatchClause[] -> unit
Public Sub AddRange (value As CodeCatchClause())
参数
- value
- CodeCatchClause[]
包含要添加到集合中的对象的类型的 CodeCatchClause 数组。
例外
value 是 null。
示例
下面的示例演示如何使用 AddRange(CodeCatchClause[]) 方法重载将对象数组 CodeCatchClause 的成员添加到其中 CodeCatchClauseCollection。
// Adds an array of CodeCatchClause objects to the collection.
CodeCatchClause[] clauses = { new CodeCatchClause(), new CodeCatchClause() };
collection.AddRange( clauses );
// Adds a collection of CodeCatchClause objects to the collection.
CodeCatchClauseCollection clausesCollection = new CodeCatchClauseCollection();
clausesCollection.Add( new CodeCatchClause("e", new CodeTypeReference(typeof(System.ArgumentOutOfRangeException))) );
clausesCollection.Add( new CodeCatchClause("e") );
collection.AddRange( clausesCollection );
' Adds an array of CodeCatchClause objects to the collection.
Dim clauses As CodeCatchClause() = {New CodeCatchClause(), New CodeCatchClause()}
collection.AddRange(clauses)
' Adds a collection of CodeCatchClause objects to the collection.
Dim clausesCollection As New CodeCatchClauseCollection()
clausesCollection.Add(New CodeCatchClause("e", New CodeTypeReference(GetType(System.ArgumentOutOfRangeException))))
clausesCollection.Add(New CodeCatchClause("e"))
collection.AddRange(clausesCollection)
另请参阅
适用于
AddRange(CodeCatchClauseCollection)
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
将另一个 CodeCatchClauseCollection 对象的内容复制到集合的末尾。
public:
void AddRange(System::CodeDom::CodeCatchClauseCollection ^ value);
public void AddRange(System.CodeDom.CodeCatchClauseCollection value);
member this.AddRange : System.CodeDom.CodeCatchClauseCollection -> unit
Public Sub AddRange (value As CodeCatchClauseCollection)
参数
一个 CodeCatchClauseCollection 包含要添加到集合的对象。
例外
value 是 null。
示例
下面的示例演示如何使用AddRange(CodeCatchClauseCollection)方法重载将一个对象的成员添加到另一个CodeCatchClauseCollectionCodeCatchClauseCollection对象。
// Adds an array of CodeCatchClause objects to the collection.
CodeCatchClause[] clauses = { new CodeCatchClause(), new CodeCatchClause() };
collection.AddRange( clauses );
// Adds a collection of CodeCatchClause objects to the collection.
CodeCatchClauseCollection clausesCollection = new CodeCatchClauseCollection();
clausesCollection.Add( new CodeCatchClause("e", new CodeTypeReference(typeof(System.ArgumentOutOfRangeException))) );
clausesCollection.Add( new CodeCatchClause("e") );
collection.AddRange( clausesCollection );
' Adds an array of CodeCatchClause objects to the collection.
Dim clauses As CodeCatchClause() = {New CodeCatchClause(), New CodeCatchClause()}
collection.AddRange(clauses)
' Adds a collection of CodeCatchClause objects to the collection.
Dim clausesCollection As New CodeCatchClauseCollection()
clausesCollection.Add(New CodeCatchClause("e", New CodeTypeReference(GetType(System.ArgumentOutOfRangeException))))
clausesCollection.Add(New CodeCatchClause("e"))
collection.AddRange(clausesCollection)