ConcurrentQueue<T>.IProducerConsumerCollection<T>.TryTake(T) ConcurrentQueue<T>.IProducerConsumerCollection<T>.TryTake(T) ConcurrentQueue<T>.IProducerConsumerCollection<T>.TryTake(T) Method

Definição

Tenta remover e retornar um objeto do IProducerConsumerCollection<T>.Attempts to remove and return an object from the IProducerConsumerCollection<T>.

 virtual bool System.Collections.Concurrent.IProducerConsumerCollection<T>.TryTake([Runtime::InteropServices::Out] T % item) = System::Collections::Concurrent::IProducerConsumerCollection<T>::TryTake;
bool IProducerConsumerCollection<T>.TryTake (out T item);
Function TryTake (ByRef item As T) As Boolean Implements IProducerConsumerCollection(Of T).TryTake

Parâmetros

item
T T T

Quando este método retornar, se a operação tiver sido bem-sucedida, item conterá o objeto removido.When this method returns, if the operation was successful, item contains the object removed. Caso nenhum objeto esteja disponível para ser removido, o valor é não especificado.If no object was available to be removed, the value is unspecified.

Retornos

true se um elemento tiver sido removido e tiver retornado com êxito; caso contrário, false.true if an element was removed and returned successfully; otherwise, false.

Implementações

Comentários

Para ConcurrentQueue<T>o, essa operação tentará remover o objeto do início ConcurrentQueue<T>do.For ConcurrentQueue<T>, this operation will attempt to remove the object from the beginning of the ConcurrentQueue<T>.

Aplica-se a

Veja também