Windows apps
Collapse the table of content
Expand the table of content
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.

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

Note   The GetResourceSet method is thread-safe.


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

© 2017 Microsoft