ModelingEnumerationConverter.ConvertTo 方法 (ITypeDescriptorContext, CultureInfo, Object, Type)

通过指定的上下文将这个域枚举对象转换成指定类型。

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

语法

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

参数

  • destinationType
    类型:System.Type
    要将值转换到的类型。

返回值

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

异常

异常 条件
ArgumentNullException

destinationType 为 nullnull 引用(在 Visual Basic 中为 Nothing)。

备注

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

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

对继承者的说明

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

.NET Framework 安全性

请参阅

参考

ModelingEnumerationConverter 类

ConvertTo 重载

Microsoft.VisualStudio.Modeling.Design 命名空间