XmlLanguage.GetEquivalentCulture Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns the appropriate equivalent CultureInfo for this XmlLanguage, if and only if such a CultureInfo is registered for the IetfLanguageTag value of this XmlLanguage

Namespace:   System.Windows.Markup
Assembly:  PresentationCore (in PresentationCore.dll)

public CultureInfo GetEquivalentCulture()

Return Value

Type: System.Globalization.CultureInfo

A CultureInfo that can be used for localization-globalization API calls that take that type as an argument.

Exception Condition

No registered CultureInfo for the provided XmlLanguage exists, as determined by a call to GetCultureInfoByIetfLanguageTag.

If no equivalent CultureInfo can be produced, this method raises an exception. If you do not wish to handle exceptions, call GetSpecificCulture instead.

.NET Framework
Available since 3.0
Return to top