This documentation is archived and is not being maintained.

ResourceManager.GetResourceSet Method

Updated: March 2012

Gets the ResourceSet for a particular culture.

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

public function GetResourceSet(
	culture : CultureInfo, 
	createIfNotExists : boolean, 
	tryParents : boolean
) : ResourceSet


Type: System.Globalization.CultureInfo

The CultureInfo to look for.

Type: System.Boolean

If true and if the ResourceSet has not been loaded yet, load it.

Type: System.Boolean

If the ResourceSet cannot be loaded, try parent CultureInfo objects to see if they exist.

Return Value

Type: System.Resources.ResourceSet
The specified ResourceSet.


The culture parameter is a null reference (Nothing in Visual Basic).


tryParents is true, no usable set of resources has been found, and there are no default culture resources.

The ResourceSet that is returned represents the resources localized for the specified culture. If the resources have not been localized for that culture and tryParents is true, GetResourceSet falls back to a parent culture (this is accomplished using CultureInfo 's Parent property), and the parent ResourceSet is returned. Otherwise, a null reference (Nothing in Visual Basic) is returned.

The parameters let you control whether the ResourceSet is created if it hasn't been loaded yet, and whether parent CultureInfo objects should be loaded as well for resource inheritance.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0

XNA Framework

Supported in: 3.0, 2.0, 1.0




March 2012

Added MissingManifestResourceException exception.

Content bug fix.

September 2009

Removed note about being thread safe. This method is not thread safe.

Information enhancement.