Rediger

Del via


XmlLanguageConverter.ConvertFrom Method

Definition

Converts the specified string value to the XmlLanguage type supported by this converter.

public:
 override System::Object ^ ConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ typeDescriptorContext, System::Globalization::CultureInfo ^ cultureInfo, System::Object ^ source);
public override object ConvertFrom (System.ComponentModel.ITypeDescriptorContext typeDescriptorContext, System.Globalization.CultureInfo cultureInfo, object source);
override this.ConvertFrom : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj -> obj
Public Overrides Function ConvertFrom (typeDescriptorContext As ITypeDescriptorContext, cultureInfo As CultureInfo, source As Object) As Object

Parameters

typeDescriptorContext
ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

cultureInfo
CultureInfo

The CultureInfo to use as the current culture.

source
Object

The string to convert.

Returns

An object that represents the converted value.

Exceptions

Conversion could not be performed.

Remarks

The source value must be a string, otherwise an exception is thrown. If the conversion is successful, the return value is a XmlLanguage.

Internally, this method calls XmlLanguage.GetLanguage. See GetLanguage for additional exception information.

Applies to

See also