Share via


ResourceManager.GetNeutralResourcesLanguage Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Returns the CultureInfo for the main assembly's neutral resources by reading the value of the NeutralResourcesLanguageAttribute on a specified Assembly.

Namespace:  System.Resources
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
<SecuritySafeCriticalAttribute> _
Protected Shared Function GetNeutralResourcesLanguage ( _
    a As Assembly _
) As CultureInfo
[SecuritySafeCriticalAttribute]
protected static CultureInfo GetNeutralResourcesLanguage(
    Assembly a
)

Parameters

Return Value

Type: System.Globalization.CultureInfo
The culture from the NeutralResourcesLanguageAttribute, if found; otherwise, CultureInfo.InvariantCulture.

Remarks

Use this method in derived classes of the ResourceManager to speed up lookups in one particular culture. For example, if this method returns "en-US" for the CultureInfo, then any U.S. English resource lookups will go straight to the main assembly and not look for the "en-US" nor "en" satellite assemblies.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.