## WeakReference< T >::TryGetTarget method


Gets the object (the target) referenced by the current [WeakReference](../../weakreference/) object.

```cpp
bool System::WeakReference<T>::TryGetTarget(const SmartPtr<T> &data) const
```


| Parameter | Type | Description |
| --- | --- | --- |
| data | const SmartPtr\<T\>\& | [Object](../../object/) referenced by the current [WeakReference](../../weakreference/) object. |

### ReturnValue

True if an operation succeded, false otherwise.

## See Also

* Class [SmartPtr](../../smartptr/)
* Class [WeakReference< T >](../)
* Namespace [System](../../)
* Library [Aspose.TeX for C++](../../../)
