ConcurrentQueue<T>.ToArray ConcurrentQueue<T>.ToArray ConcurrentQueue<T>.ToArray ConcurrentQueue<T>.ToArray Method

定义

ConcurrentQueue<T> 中存储的元素复制到新数组中。Copies the elements stored in the ConcurrentQueue<T> 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[]

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

实现

适用于

另请参阅