CookieCollection.ICollection.CopyTo(Array, Int32) 方法
定义
将 CookieCollection 的元素复制到指定数组,从特定索引开始。Copies the elements of a CookieCollection to the specified array, starting at a particular index.
virtual void System.Collections.ICollection.CopyTo(Array ^ array, int index) = System::Collections::ICollection::CopyTo;
void ICollection.CopyTo (Array array, int index);
abstract member System.Collections.ICollection.CopyTo : Array * int -> unit
override this.System.Collections.ICollection.CopyTo : Array * int -> unit
Sub CopyTo (array As Array, index As Integer) Implements ICollection.CopyTo
参数
- array
- Array
该 CookieCollection 将被复制到的目标数组。The target array to which the CookieCollection will be copied.
- index
- Int32
目标数组中复制开始位置的从零开始的索引。The zero-based index in the target array where copying begins.
实现
例外
array 为 null。array is null.
index 小于零。index is less than zero.
array 是多维的。array is multidimensional.
- 或 --or-
此 CookieCollection 中的元素数大于从 index 到目标 array 末尾之间的可用空间。The number of elements in this CookieCollection is greater than the available space from index to the end of the destination array.
此 CookieCollection 中的元素无法自动转换为目标 array 的类型。The elements in this CookieCollection cannot be cast automatically to the type of the destination array.
注解
该 Array array 参数必须是一维,并具有从零开始的索引。The Arrayarray parameter must be one-dimensional with zero-based indexing.