DataFieldConverter.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

可用于提供其他区域性信息的 A CultureInfo

value
Object

要从中转换的对象。

返回

包含已转换对象的字符串。

例外

object 不是 null ,不是字符串。

注解

注释

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

适用于

另请参阅