Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ResourceManager.GetResourceSet Method

Gets the ResourceSet for a particular culture.

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

[SecuritySafeCriticalAttribute]
public virtual ResourceSet GetResourceSet(
	CultureInfo culture,
	bool createIfNotExists,
	bool tryParents
)

Parameters

culture
Type: System.Globalization.CultureInfo
The culture to look for.
createIfNotExists
Type: System.Boolean
true to load the ResourceSet, if it has not been loaded yet; otherwise, false.
tryParents
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.

ExceptionCondition
ArgumentNullException

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.

NoteNote:

The GetResourceSet method is thread-safe.

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

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

Community Additions

Show:
© 2014 Microsoft