WeakReference<T>.TryGetTarget Method

July 28, 2014

Tries to retrieve the target object that is referenced by the current WeakReference<T> object.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public bool TryGetTarget(
	out T target
)

Parameters

target
Type: T %
When this method returns, contains the target object, if available. This parameter is passed uninitialized.

Return Value

Type: System.Boolean
true if the target was retrieved, false otherwise.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2014 Microsoft