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

Définition

Tente de supprimer et de renvoyer un objet de l’objet 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

Lorsque cette méthode retourne, si l’opération a réussi, item contient l’objet supprimé. Si aucun objet n’a été disponible pour être supprimé, la valeur n’est pas spécifiée.

Retours

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

Implémente

Remarques

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

S’applique à

Voir aussi