Windows Dev Center

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 override Object ConvertTo(
	ITypeDescriptorContext typeDescriptorContext,
	CultureInfo cultureInfo,
	Object value,
	Type destinationType
)

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.

ExceptionCondition
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

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft