Edit

Share via


XmlLanguage.GetSpecificCulture Method

Definition

Returns the most-closely-related non-neutral CultureInfo for this XmlLanguage.

public:
 System::Globalization::CultureInfo ^ GetSpecificCulture();
public System.Globalization.CultureInfo GetSpecificCulture ();
member this.GetSpecificCulture : unit -> System.Globalization.CultureInfo
Public Function GetSpecificCulture () As CultureInfo

Returns

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

Exceptions

No related non-neutral CultureInfo is registered for the current XmlLanguageIetfLanguageTag.

Remarks

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.

Applies to