ConcurrentStack<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 ConcurrentStack<T>, cette opération tente de faire apparaître l’objet en haut de .ConcurrentStack<T>
S’applique à
Voir aussi
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de l’année 2024, nous abandonnerons progressivement le mécanisme de retour d’information GitHub Issues pour le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultez :Soumettre et afficher des commentaires pour