WeakGCHandle<T>.TryGetTarget(T) Méthode

Définition

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é.

S’applique à