Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

XmlLanguageConverter::ConvertTo Method (ITypeDescriptorContext^, CultureInfo^, Object^, Type^)

 

Converts the specified XmlLanguage to the specified type.

Namespace:   System.Windows.Markup
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.

Return Value

Type: System::Object^

An object that represents the converted value.

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.

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft