XmlLanguageConverter::ConvertTo Method (ITypeDescriptorContext^, CultureInfo^, Object^, Type^)
Converts the specified XmlLanguage to the specified type.
Assembly: PresentationCore (in PresentationCore.dll)
public: [SecurityCriticalAttribute] virtual Object^ ConvertTo( ITypeDescriptorContext^ typeDescriptorContext, CultureInfo^ cultureInfo, Object^ value, Type^ destinationType ) override
Parameters
- typeDescriptorContext
-
Type:
System.ComponentModel::ITypeDescriptorContext^
An ITypeDescriptorContext that provides a format context.
- cultureInfo
-
Type:
System.Globalization::CultureInfo^
The CultureInfo to use as the current culture.
- value
-
Type:
System::Object^
The object to convert. This is expected to be type XmlLanguage.
- destinationType
-
Type:
System::Type^
A type that represents the type you want to convert to.
| Exception | Condition |
|---|---|
| InvalidOperationException | Conversion could not be performed. |
| ArgumentNullException | destinationType is null. |
For destinationType String, this method returns the IetfLanguageTag value of the provided XmlLanguage. For destinationType InstanceDescriptor this method returns an InstanceDescriptor instance that is useful for serialization. Other destinationType inputs throw exceptions.
Available since 3.0