GetResourceSet Method

ResourceManager.GetResourceSet Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets the ResourceSet for a particular culture.

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

'Declaration
Public Overridable Function GetResourceSet ( _
	culture As CultureInfo, _
	createIfNotExists As Boolean, _
	tryParents As Boolean _
) As ResourceSet

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 Nothing.

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

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft