## ObjectExt::UnboxToNullable method


Unboxes object to nullable type.

```cpp
template<class T> static Nullable<T> System::ObjectExt::UnboxToNullable(const SmartPtr<Object> &obj, bool safe=true)
```


| Parameter | Description |
| --- | --- |
| T | Destination type. |

| Parameter | Type | Description |
| --- | --- | --- |
| obj | const SmartPtr\<Object\>\& | [Object](../../object/) to unbox. |
| safe | bool | If true, return nullptr on failure, otherwise throw InvalidCastException. |

### ReturnValue

Unboxed nullable value (could be null).

## See Also

* Class [Nullable](../../nullable/)
* Class [SmartPtr](../../smartptr/)
* Class [Object](../../object/)
* Class [ObjectExt](../)
* Namespace [System](../../)
* Library [Aspose.TeX for C++](../../../)
