ConcurrentQueue<T>.IProducerConsumerCollection<T>.TryTake Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
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
Commentaires
https://aka.ms/ContentUserFeedback.
Prochainement : Tout au long de l'année 2024, nous supprimerons progressivement les GitHub Issues en tant que mécanisme de retour d'information pour le contenu et nous les remplacerons par un nouveau système de retour d'information. Pour plus d’informations, voir:Soumettre et afficher des commentaires pour