DataMemberConverter.ConvertFrom 方法

定义

使用指定的上下文将指定对象转换为关联控件属性的类型。 此 API 已过时。 有关如何开发 ASP.NET 移动应用程序的信息,请参阅 Mobile Apps &具有 ASP.NET 的网站。

public:
 override System::Object ^ ConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ culture, System::Object ^ value);
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value);
override this.ConvertFrom : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj -> obj
Public Overrides Function ConvertFrom (context As ITypeDescriptorContext, culture As CultureInfo, value As Object) As Object

参数

context
ITypeDescriptorContext

一个 ITypeDescriptorContext 表示属性所属的数据绑定组件或控件。

culture
CultureInfo

CultureInfo可用于提供其他区域性信息的对象。

value
Object

要从中转换的值。

返回

一个字符串, value 包含 if value is and null contains a string;否则为空字符串(“)。

例外

value 不是 null 字符串。

注解

注释

通常不会直接访问类型转换器。 此实现 TypeConverter 旨在供设计时由数据绑定控件使用,并使用属性上的实例化 TypeConverterAttribute

适用于

另请参阅