ConcurrentBag<T>.TryTake(T) 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 renvoyer un objet de l’objet ConcurrentBag<T>.
public:
virtual bool TryTake([Runtime::InteropServices::Out] T % result);
public bool TryTake(out T result);
abstract member TryTake : 'T -> bool
override this.TryTake : 'T -> bool
Public Function TryTake (ByRef result As T) As Boolean
Paramètres
- result
- T
Lorsque cette méthode est retournée, result contient l’objet supprimé de la ConcurrentBag<T> valeur par défaut ou si T le conteneur est vide.
Retours
true si un objet a été supprimé avec succès ; sinon, false.