## WeakReference<>::set_Target method


Sets the object (the target) referenced by the current [WeakReference](../../weakreference/) object.

```cpp
void System::WeakReference<>::set_Target(const SmartPtr<Object> &data)
```


| Parameter | Type | Description |
| --- | --- | --- |
| data | const SmartPtr\<Object\>\& | [Object](../../object/) to set. |

## See Also

* Class [SmartPtr](../../smartptr/)
* Class [Object](../../object/)
* Class [WeakReference<>](../)
* Namespace [System](../../)
* Library [Aspose.PDF for C++](../../../)
