Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ResourceManager.GetResourceSet Method

Gets the ResourceSet for a particular culture.

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

Public Overridable Function GetResourceSet ( _
	culture As CultureInfo, _
	createIfNotExists As Boolean, _
	tryParents As Boolean _
) As ResourceSet
Dim instance As ResourceManager
Dim culture As CultureInfo
Dim createIfNotExists As Boolean
Dim tryParents As Boolean
Dim returnValue As ResourceSet

returnValue = instance.GetResourceSet(culture, createIfNotExists, tryParents)
public ResourceSet GetResourceSet (
	CultureInfo culture, 
	boolean createIfNotExists, 
	boolean tryParents
public function GetResourceSet (
	culture : CultureInfo, 
	createIfNotExists : boolean, 
	tryParents : boolean
) : ResourceSet



The CultureInfo to look for.


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


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

Return Value

The specified ResourceSet.

Exception typeCondition


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

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.


The GetResourceSet method is thread-safe.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

Community Additions

© 2015 Microsoft