System.Collections.Concurrent.IProducerConsumerCollection<T>.ToArray Method

Copies the elements contained in the System.Collections.Concurrent.IProducerConsumerCollection`1 to a new array.

Syntax

public T[] ToArray ()

Returns

A new array containing the elements copied from the System.Collections.Concurrent.IProducerConsumerCollection`1.

Remarks

The method provides a snapshot of the underlying collection. It is possible for other threads to add or remove items immediately after the array is made.

Requirements

Namespace: System.Collections.Concurrent
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0