BlockingCollection<T>.ICollection.CopyTo(Array, Int32) メソッド
定義
BlockingCollection<T> インスタンス内のすべての項目を、互換性のある 1 次元配列にコピーします。コピー操作は、コピー先の配列の、指定したインデックスから始まります。Copies all of the items in the BlockingCollection<T> instance to a compatible one-dimensional array, starting at the specified index of the target array.
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
BlockingCollection<T> インスタンスから要素がコピーされる先の 1 次元配列。The one-dimensional array that is the destination of the elements copied from the BlockingCollection<T> instance. 配列には、0 から始まるインデックスが設定されている必要があります。The array must have zero-based indexing.
- index
- Int32
コピーの開始位置とする array
のインデックス (0 から始まる)。The zero-based index in array
at which copying begins.
実装
例外
BlockingCollection<T> は破棄されています。The BlockingCollection<T> has been disposed.
array
引数が null です。The array
argument is null.
index
引数は 0 未満です。The index
argument is less than zero.
index
引数が array
の長さ以上か、配列が多次元か、またはコレクションの型パラメーターを自動的にコピー先の配列の型にキャストできません。The index
argument is equal to or greater than the length of the array
, the array is multidimensional, or the type parameter for the collection cannot be cast automatically to the type of the destination array.