XmlLanguage.GetSpecificCulture 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 most-closely-related non-neutral CultureInfo for this XmlLanguage.

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

public CultureInfo GetSpecificCulture()

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 related non-neutral CultureInfo is registered for the current XmlLanguage  IetfLanguageTag.

If this XmlLanguage is equal to XmlLanguage.Empty then this method will return CultureInfo.InvariantCulture.

This method finds the registered CultureInfo matching the longest-possible prefix of this XmlLanguage. If that registered CultureInfo is neutral (IsNeutralCulture is true), then this method relies on a call to CreateSpecificCulture to map from a neutral CultureInfo to a specific one.

.NET Framework
Available since 3.0
Return to top