This documentation is archived and is not being maintained.

ResourceManager.GetNeutralResourcesLanguage Method

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

[Visual Basic]
Protected Shared Function GetNeutralResourcesLanguage( _
   ByVal a As Assembly _
) As CultureInfo
protected static CultureInfo GetNeutralResourcesLanguage(
 Assembly a
protected: static CultureInfo* GetNeutralResourcesLanguage(
 Assembly* a
protected static function GetNeutralResourcesLanguage(
   a : Assembly
) : CultureInfo;


The assembly for which to return a CultureInfo.

Return Value

The culture from the NeutralResourcesLanguageAttribute, if found; otherwise, CultureInfo.InvariantCulture.


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.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

.NET Framework Security: 

See Also

ResourceManager Class | ResourceManager Members | System.Resources Namespace