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)
参数类型描述
contextconst System::SharedPtr<ITypeDescriptorContext>&Object 转换上下文信息。
文化const System::SharedPtr<System::Globalization::CultureInfo>&在转换对象时使用的区域性。
文本const 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)
参数类型描述
contextconst System::SharedPtr<ITypeDescriptorContext>&Object 转换上下文信息。
文本const System::String&要转换的值。

ReturnValue

已转换的对象。

另见

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

将字符串转换为对象。

System::SharedPtr<System::Object> System::ComponentModel::TypeConverter::ConvertFromString(const System::String &text)
参数类型描述
文本const System::String&要转换的值。

ReturnValue

已转换的对象。

另见