System::ComponentModel::TypeConverter::ConvertTo 方法

TypeConverter::ConvertTo(const System::SharedPtr<ITypeDescriptorContext>&, const System::SharedPtr<System::Globalization::CultureInfo>&, const System::SharedPtr<System::Object>&, const System::TypeInfo&) method

将对象转换为特定类型。

virtual System::SharedPtr<System::Object> System::ComponentModel::TypeConverter::ConvertTo(const System::SharedPtr<ITypeDescriptorContext> &context, const System::SharedPtr<System::Globalization::CultureInfo> &culture, const System::SharedPtr<System::Object> &value, const System::TypeInfo &destinationType)
参数类型描述
contextconst System::SharedPtr<ITypeDescriptorContext>&Object 转换上下文信息。
文化const System::SharedPtr<System::Globalization::CultureInfo>&在转换对象时使用的区域性。
valueconst System::SharedPtr<System::Object>&Object 要转换的。
destinationTypeconst System::TypeInfo&要转换到的类型。

ReturnValue

已转换的对象。

另见

TypeConverter::ConvertTo(const System::SharedPtr<System::Object>&, const System::TypeInfo&) method

将对象转换为特定类型。

System::SharedPtr<System::Object> System::ComponentModel::TypeConverter::ConvertTo(const System::SharedPtr<System::Object> &value, const System::TypeInfo &destinationType)
参数类型描述
valueconst System::SharedPtr<System::Object>&Object 要转换的。
destinationTypeconst System::TypeInfo&要转换到的类型。

ReturnValue

已转换的对象。

另见