System::ObjectExt::Unbox 方法

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

在转换为 Object 后解箱值类型。对枚举类型的实现。

template<typename T> static std::enable_if<std::is_enum<T>::value, T>::type System::ObjectExt::Unbox(const SmartPtr<Object> &obj)
参数描述
TEnum 类型。
参数类型描述
objconst SmartPtr<Object>&Object 用于解箱。

ReturnValue

Enum value.

另见

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

在转换为 Object 后解箱值类型。对非枚举且非可空类型的实现。

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)
参数描述
T值类型。
参数类型描述
objconst SmartPtr<Object>&Object 用于解箱。

ReturnValue

已解箱的值。

另见

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

在转换为 Object 后解箱值类型。对非枚举且非可空类型的实现。

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)
参数描述
T值类型。
参数类型描述
objconst SmartPtr<Object>&Object 用于解箱。

ReturnValue

已解箱的值。

另见

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

解箱字符串值。

String System::ObjectExt::Unbox(const SmartPtr<Object> &obj)
参数类型描述
objconst SmartPtr<Object>&Object 用于解箱

ReturnValue

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

另见

ObjectExt::Unbox(E) method

将枚举类型解箱为整数。

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)
参数描述
T目标整数类型。
E源枚举类型。
参数类型描述
eE待解箱的值。

ReturnValue

枚举的整数表示。

另见

ObjectExt::Unbox(E) method

转换枚举类型。

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)
参数描述
T目标枚举类型。
E源枚举类型。
参数类型描述
eE待解箱的值。

ReturnValue

已转换的枚举值。

另见