ConcurrentQueue<T>.IProducerConsumerCollection<T>.TryTake Méthode

Définition

Tente de supprimer et de retourner un objet du 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);
abstract member System.Collections.Concurrent.IProducerConsumerCollection<T>.TryTake : 'T -> bool
override this.System.Collections.Concurrent.IProducerConsumerCollection<T>.TryTake : 'T -> bool
Function TryTake (ByRef item As T) As Boolean Implements IProducerConsumerCollection(Of T).TryTake

Paramètres

item
T

Quand cette méthode retourne une valeur, si l'opération a réussi, item contient l'objet supprimé. S'il n'existait aucun objet à supprimer, la valeur n'est pas spécifiée.

Retours

true si un élément a été supprimé et retourné ; sinon, false.

Implémente

Remarques

Pour ConcurrentQueue<T>, cette opération tente de supprimer l’objet à partir du début de .ConcurrentQueue<T>

S’applique à

Voir aussi