System::ComponentModel::TypeConverter::ConvertFromString 方法

TypeConverter::ConvertFromString(const System::SharedPtr<ITypeDescriptorContext>&, const System::SharedPtr<System::Globalization::CultureInfo>&, const System::String&) method

将字符串转换为对象。

System::SharedPtr<System::Object> System::ComponentModel::TypeConverter::ConvertFromString(const System::SharedPtr<ITypeDescriptorContext> &context, const System::SharedPtr<System::Globalization::CultureInfo> &culture, const System::String &text)
ParameterType描述
contextconst System::SharedPtr<ITypeDescriptorContext>&Object 转换上下文信息。
区域性const System::SharedPtr<System::Globalization::CultureInfo>&在转换对象时使用的区域性。
textconst System::String&要转换的值。

ReturnValue

已转换的对象。

另见

TypeConverter::ConvertFromString(const System::SharedPtr<ITypeDescriptorContext>&, const System::String&) method

将字符串转换为对象。

System::SharedPtr<System::Object> System::ComponentModel::TypeConverter::ConvertFromString(const System::SharedPtr<ITypeDescriptorContext> &context, const System::String &text)
ParameterType描述
contextconst System::SharedPtr<ITypeDescriptorContext>&Object 转换上下文信息。
textconst System::String&要转换的值。

ReturnValue

已转换的对象。

另见

TypeConverter::ConvertFromString(const System::String&) method

将字符串转换为对象。

System::SharedPtr<System::Object> System::ComponentModel::TypeConverter::ConvertFromString(const System::String &text)
ParameterType描述
textconst System::String&要转换的值。

ReturnValue

已转换的对象。

另见