System::ObjectExt::ToString 方法

ObjectExt::ToString(const char_t *) method

为 C# 的 ToString 方法提供替代,使其在任何 C++ 类型上工作。

static String System::ObjectExt::ToString(const char_t *obj)
参数类型描述
objconst char_t *String 字面量转换为字符串。

ReturnValue

String representation of obj.

另见

ObjectExt::ToString(const Nullable<T>&) method

为 C# 的 ToString 方法提供替代,使其在任何 C++ 类型上工作。

template<typename T> static String System::ObjectExt::ToString(const Nullable<T> &obj)
参数描述
TNullable 类型。
参数类型描述
objconst Nullable<T>&Nullable 对象转换为字符串。

ReturnValue

String representation of obj.

另见

ObjectExt::ToString(const T&) method

为 C# 的 ToString 方法提供替代,使其在任何 C++ 类型上工作。

template<typename T> static std::enable_if<std::is_enum<T>::value, String>::type System::ObjectExt::ToString(const T &obj)
参数描述
TEnum 类型。
参数类型描述
objconst T&Enum 值转换为字符串。

ReturnValue

String representation of obj.

另见

ObjectExt::ToString(const T&) method

为 C# 的 ToString 方法提供替代,使其在任何 C++ 类型上工作。

template<typename T> static std::enable_if<IsSmartPtr<T>::value, String>::type System::ObjectExt::ToString(const T &obj)
参数描述
T智能指针类型。
参数类型描述
objconst T&SmartPtr 值转换为字符串。

ReturnValue

String representation of obj.

另见

ObjectExt::ToString(const T&) method

为 C# 的 ToString 方法提供替代,使其在任何 C++ 类型上工作。

template<typename T> static std::enable_if<!IsSmartPtr<T>::value &&!std::is_scalar<T>::value &&!IsNullable<T>::value, String>::type System::ObjectExt::ToString(const T &obj)
参数描述
T结构体类型。
参数类型描述
objconst T&结构体值转换为字符串。

ReturnValue

String representation of obj.

另见

ObjectExt::ToString(T&&) method

为 C# 的 ToString 方法提供替代,使其在任何 C++ 类型上工作。

template<typename T> static std::enable_if<!IsSmartPtr<T>::value &&std::is_scalar<T>::value &&!std::is_enum<T>::value, String>::type System::ObjectExt::ToString(T &&obj)
参数描述
T标量类型。
参数类型描述
objT&&标量值转换为字符串。

ReturnValue

String representation of obj.

另见

ObjectExt::ToString(T&&) method

为 C# 的 ToString 方法提供替代,使其在任何 C++ 类型上工作。

template<typename T> static std::enable_if<!IsSmartPtr<T>::value &&!std::is_scalar<T>::value &&!IsNullable<T>::value &&!std::is_reference<T>::value, String>::type System::ObjectExt::ToString(T &&obj)
参数描述
T标量类型。
参数类型描述
objT&&标量值转换为字符串。

ReturnValue

String representation of obj.

另见

ObjectExt::ToString(T&) method

为 C# 的 ToString 方法提供替代,使其在任何 C++ 类型上工作。

template<typename T> static std::enable_if<IsSmartPtr<T>::value||std::is_pointer<T>::value||IsExceptionWrapper<T>::value, String>::type System::ObjectExt::ToString(T &obj)
参数描述
T智能指针类型或 ExceptionWrapper
参数类型描述
objT&智能指针或 ExceptionWrapper 转换为字符串。

ReturnValue

String representation of obj.

另见

ObjectExt::ToString(T&) method

为 C# 的 ToString 方法提供替代,使其在任何 C++ 类型上工作。

template<typename T> static std::enable_if<!IsSmartPtr<T>::value &&std::is_scalar<T>::value &&!std::is_enum<T>::value, String>::type System::ObjectExt::ToString(T &obj)
参数描述
T标量类型。
参数类型描述
objT&标量值转换为字符串。

ReturnValue

String representation of obj.

另见

ObjectExt::ToString(T&) method

为 C# 的 ToString 方法提供替代,使其在任何 C++ 类型上工作。

template<typename T> static std::enable_if<!IsExceptionWrapper<T>::value &&!IsSmartPtr<T>::value &&!std::is_scalar<T>::value &&!IsNullable<T>::value, String>::type System::ObjectExt::ToString(T &obj)
参数描述
T结构体类型。
参数类型描述
objT&结构体值转换为字符串。

ReturnValue

String representation of obj.

另见