WeakReference<T>.TryGetTarget(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 récupérer l'objet cible qui est référencé par l'objet WeakReference<T> actif.
public:
bool TryGetTarget([Runtime::InteropServices::Out] T % target);
public bool TryGetTarget(out T target);
member this.TryGetTarget : 'T -> bool
Public Function TryGetTarget (ByRef target As T) As Boolean
Paramètres
- target
- T
Lorsque cette méthode est retournée, contient l'objet cible, s'il est disponible. Ce paramètre est traité comme étant non initialisé.
Retours
true si la cible a été récupérée ; sinon, false.