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)


Public Overridable Function GetResourceSet ( _
    culture As CultureInfo, _
    createIfNotExists As Boolean, _
    tryParents As Boolean _
) As ResourceSet
public virtual ResourceSet GetResourceSet(
    CultureInfo culture,
    bool createIfNotExists,
    bool tryParents


Return Value

Type: System.Resources..::.ResourceSet
The specified resource set.


Exception Condition

The culture parameter is nullNothingnullptra 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, nullNothingnullptra 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.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0


Windows Phone

See Also


ResourceManager Class

System.Resources Namespace