ConcurrentBag<T>.TryPeek(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 retourner un objet du ConcurrentBag<T> sans le supprimer.
public:
bool TryPeek([Runtime::InteropServices::Out] T % result);
public bool TryPeek (out T result);
member this.TryPeek : 'T -> bool
Public Function TryPeek (ByRef result As T) As Boolean
Paramètres
- result
- T
Lorsque cette méthode retourne une valeur, result contient un objet du ConcurrentBag<T> ou la valeur par défaut de T si l'opération échoue.
Retours
true si un objet a été retourné avec succès ; sinon, false.