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

定义

使用指定的上下文和区域性信息将给定对象转换为指定的类型。Converts the given object to the specified type, using the specified context and culture information.

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

参数

context
ITypeDescriptorContext

一个提供格式上下文的 ITypeDescriptorContextA ITypeDescriptorContext that provides a format context.

culture
CultureInfo

区域性信息。The culture information. 如果传递 null,则采用当前区域性。If null is passed, the current culture is assumed.

value
Object

要转换的对象。The object to convert.

destinationType
Type

value 参数所要转换成的类型。The type to convert the value parameter to.

返回

转换后的值。The converted value.

适用于