ServiceXNameTypeConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type) ServiceXNameTypeConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type) ServiceXNameTypeConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type) ServiceXNameTypeConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type) Method

定義

XName 執行個體轉換為指定型別的物件。Converts a XName instance to an object of the specified type.

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 ITypeDescriptorContext ITypeDescriptorContext ITypeDescriptorContext

型別描述項內容。The type descriptor context.

culture
CultureInfo CultureInfo CultureInfo CultureInfo

目前文化特性。The current culture.

value
Object Object Object Object

要進行轉換的值。The value to convert.

destinationType
Type Type Type Type

要將值轉換成的型別。The type to convert the value to.

傳回

轉換的值。The converted value.

備註

如果在轉換後的 XName 中並未提供命名空間,則此方法會傳回非限定本機名稱。This method returns an unqualified local name if no namespace has been provided in the XName being converted. 非限定本機名稱是未包含命名空間的 XNameAn unqualified local name is a XName that contains no namespace.

適用於