ConcurrentBag<T>.ToArray ConcurrentBag<T>.ToArray ConcurrentBag<T>.ToArray ConcurrentBag<T>.ToArray Method

定義

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>.

實作

適用於

另請參閱