Export (0) Print
Expand All

ResourceManager.GetResourceSet Method

Gets the ResourceSet for a particular culture.

[Visual Basic]
Public Overridable Function GetResourceSet( _
   ByVal culture As CultureInfo, _
   ByVal createIfNotExists As Boolean, _
   ByVal tryParents As Boolean _
) As ResourceSet
[C#]
public virtual ResourceSet GetResourceSet(
 CultureInfo culture,
 bool createIfNotExists,
 bool tryParents
);
[C++]
public: virtual ResourceSet* GetResourceSet(
 CultureInfo* culture,
 bool createIfNotExists,
 bool tryParents
);
[JScript]
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.

Exceptions

Exception Type Condition
ArgumentNullException The culture parameter is a null reference (Nothing in Visual Basic).

Remarks

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.

Note   The GetResourceSet method is thread-safe.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

.NET Framework Security: 

See Also

ResourceManager Class | ResourceManager Members | System.Resources Namespace | CultureInfo | Developing World-Ready Applications

Show:
© 2014 Microsoft