CodeCatchClauseCollection.CopyTo(CodeCatchClause[], Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将集合对象复制到从指定索引开始的一维 Array 实例。
public:
void CopyTo(cli::array <System::CodeDom::CodeCatchClause ^> ^ array, int index);
public void CopyTo(System.CodeDom.CodeCatchClause[] array, int index);
member this.CopyTo : System.CodeDom.CodeCatchClause[] * int -> unit
Public Sub CopyTo (array As CodeCatchClause(), index As Integer)
参数
- array
- CodeCatchClause[]
一维 Array 是从集合复制的值的目标。
- index
- Int32
开始插入的数组的索引。
例外
参数 array 为 null.
参数 index 小于目标数组的最小索引。
示例
下面的示例演示如何将 a CodeCatchClauseCollection 的内容复制到从索引值 0 开始的 CodeCatchClause 数组。
// Copies the contents of the collection beginning at index 0 to the specified CodeCatchClause array.
// 'clauses' is a CodeCatchClause array.
collection.CopyTo( clauses, 0 );
' Copies the contents of the collection beginning at index 0 to the specified CodeCatchClause array.
' 'clauses' is a CodeCatchClause array.
collection.CopyTo(clauses, 0)