IProducerConsumerCollection<T>::ToArray Method ()

.NET Framework (current version)
 

Copies the elements contained in the IProducerConsumerCollection<T> to a new array.

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

array<T>^ ToArray()

Return Value

Type: array<T>^

A new array containing the elements copied from the IProducerConsumerCollection<T>.

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.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
Show: