ResourceManager.GetResourceSet Method

Gets the ResourceSet for a particular culture.

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

public virtual ResourceSet GetResourceSet(
	CultureInfo culture,
	bool createIfNotExists,
	bool tryParents


Type: System.Globalization.CultureInfo
The culture to look for.
Type: System.Boolean
true to load the ResourceSet, if it has not been loaded yet; otherwise, false.
Type: System.Boolean
true to try parent CultureInfo objects to see if they exist, if ResourceSet cannot be loaded; otherwise, false.

Return Value

Type: System.Resources.ResourceSet
The specified resource set.


The culture parameter is null.

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, null 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.


The GetResourceSet method is thread-safe.


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

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

Community Additions