TryGetTarget Method
Collapse the table of content
Expand the table of content

WeakReference(Of T).TryGetTarget Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Tries to retrieve the target object that is referenced by the current WeakReference(Of T) object.

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

'Declaration
Public Function TryGetTarget ( _
	<OutAttribute> ByRef target As T _
) As Boolean

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:
© 2017 Microsoft