ConcurrentBag<T>.ToArray 方法

定义

ConcurrentBag<T> 元素复制到新数组。Copies the ConcurrentBag<T> elements to a new array.

public:
 virtual cli::array <T> ^ ToArray();
public T[] ToArray ();
abstract member ToArray : unit -> 'T[]
override this.ToArray : unit -> 'T[]
Public Function ToArray () As T()

返回

T[]

新数组包含从 ConcurrentBag<T> 复制的元素的快照。A new array containing a snapshot of elements copied from the ConcurrentBag<T>.

实现

适用于

另请参阅