ModelingEnumerationConverter.ConvertFrom 方法 (ITypeDescriptorContext, CultureInfo, Object)

使用指定的上下文,转换为字段枚举对象的指定对象。

命名空间:  Microsoft.VisualStudio.Modeling.Design
程序集:  Microsoft.VisualStudio.Modeling.Sdk.11.0(在 Microsoft.VisualStudio.Modeling.Sdk.11.0.dll 中)

语法

声明
Public Overrides Function ConvertFrom ( _
    context As ITypeDescriptorContext, _
    culture As CultureInfo, _
    value As Object _
) As Object
public override Object ConvertFrom(
    ITypeDescriptorContext context,
    CultureInfo culture,
    Object value
)

参数

返回值

类型:System.Object
转换后的值。

异常

异常 条件
FormatException

value 不是目标类型的有效值。

备注

此转换器只可将枚举对象与字符串相互转换。

默认情况下,区域性参数将被忽略。

对继承者的说明

重写此方法以提供您自己的转换。

.NET Framework 安全性

请参见

参考

ModelingEnumerationConverter 类

ConvertFrom 重载

Microsoft.VisualStudio.Modeling.Design 命名空间