System::ObjectExt::Unbox method

ObjectExt::Unbox(const SmartPtr<Object>&) method

Unboxes value types after converting to Object. Implementation for enum types.

template<typename T> static std::enable_if<std::is_enum<T>::value, T>::type System::ObjectExt::Unbox(const SmartPtr<Object> &obj)
ParameterDescription
TEnum type.
ParameterTypeDescription
objconst SmartPtr<Object>&Object to unbox.

ReturnValue

Enum value.

See Also

ObjectExt::Unbox(const SmartPtr<Object>&) method

Unboxes value types after converting to Object. Implementation for non-enum & non-nullable types.

template<class T> static std::enable_if<!std::is_enum<T>::value &&detail::has_operator_equal<T>::value, T>::type System::ObjectExt::Unbox(const SmartPtr<Object> &obj)
ParameterDescription
TValue type.
ParameterTypeDescription
objconst SmartPtr<Object>&Object to unbox.

ReturnValue

Unboxed value.

See Also

ObjectExt::Unbox(const SmartPtr<Object>&) method

Unboxes value types after converting to Object. Implementation for non-enum & non-nullable types.

template<class T> static std::enable_if<!std::is_enum<T>::value &&!detail::has_operator_equal<T>::value, T>::type System::ObjectExt::Unbox(const SmartPtr<Object> &obj)
ParameterDescription
TValue type.
ParameterTypeDescription
objconst SmartPtr<Object>&Object to unbox.

ReturnValue

Unboxed value.

See Also

ObjectExt::Unbox(E) method

Unboxes enum types to integer.

template<class T,class E> static std::enable_if<std::is_enum<E>::value &&std::numeric_limits<T>::is_integer, T>::type System::ObjectExt::Unbox(E e)
ParameterDescription
TDestination integer type.
ESource enum type.
ParameterTypeDescription
eEValue to unbox.

ReturnValue

Integer representation of enum.

See Also

ObjectExt::Unbox(E) method

Converts enum types.

template<class T,class E> static std::enable_if<std::is_enum<E>::value &&std::is_enum<T>::value, T>::type System::ObjectExt::Unbox(E e)
ParameterDescription
TDestination enum type.
ESource enum type.
ParameterTypeDescription
eEValue to unbox.

ReturnValue

Converted enum value.

See Also

ObjectExt::Unbox(const SmartPtr<Object>&) method

Unboxes string values.

String System::ObjectExt::Unbox(const SmartPtr<Object> &obj)
ParameterTypeDescription
objconst SmartPtr<Object>&Object to unbox

ReturnValue

String representation of boxed string, can be null if boxed string was null.

See Also