Export (0) Print
Expand All

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
)
public ResourceSet GetResourceSet (
	CultureInfo culture, 
	boolean createIfNotExists, 
	boolean tryParents
)
public function GetResourceSet (
	culture : CultureInfo, 
	createIfNotExists : boolean, 
	tryParents : boolean
) : ResourceSet

Parameters

culture

The CultureInfo to look for.

createIfNotExists

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

tryParents

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

Return Value

The specified ResourceSet.

Exception typeCondition

ArgumentNullException

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.

NoteNote

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

ADD
Show:
© 2014 Microsoft