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

實作

適用於

另請參閱