WeakGCHandle<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 référencé par l’objet actuel WeakGCHandle<T> .
public:
bool TryGetTarget([Runtime::InteropServices::Out] T % target);
public readonly 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.
Retours
true si la cible a été récupérée ; sinon, false.
Exceptions
Le handle n’est pas initialisé ou est déjà supprimé.