ResourceSet Class
Stores all the resources localized for one particular culture, ignoring all other cultures, including any fallback rules.
Security Note: Calling methods in this class with untrusted data is a security risk. Call the methods in the class only with trusted data. For more information, see Untrusted Data Security Risks.
Assembly: mscorlib (in mscorlib.dll)
| Name | Description | |
|---|---|---|
![]() | ResourceSet() | Initializes a new instance of the ResourceSet class with default properties. |
![]() | ResourceSet(IResourceReader^) | Creates a new instance of the ResourceSet class using the specified resource reader. |
![]() | ResourceSet(Stream^) | Creates a new instance of the ResourceSet class using the system default ResourceReader that reads resources from the given stream. |
![]() | ResourceSet(String^) | Creates a new instance of the ResourceSet class using the system default ResourceReader that opens and reads resources from the given file. |
| Name | Description | |
|---|---|---|
![]() | Close() | Closes and releases any resources used by this ResourceSet. |
![]() | Dispose() | Disposes of the resources (other than memory) used by the current instance of ResourceSet. |
![]() | Dispose(Boolean) | Releases resources (other than memory) associated with the current instance, closing internal managed objects if requested. |
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) |
![]() | GetDefaultReader() | Returns the preferred resource reader class for this kind of ResourceSet. |
![]() | GetDefaultWriter() | Returns the preferred resource writer class for this kind of ResourceSet. |
![]() | GetEnumerator() | Returns an IDictionaryEnumerator that can iterate through the ResourceSet. |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetObject(String^) | Searches for a resource object with the specified name. |
![]() | GetObject(String^, Boolean) | Searches for a resource object with the specified name in a case-insensitive manner, if requested. |
![]() | GetString(String^) | Searches for a String resource with the specified name. |
![]() | GetString(String^, Boolean) | Searches for a String resource with the specified name in a case-insensitive manner, if requested. |
![]() | GetType() | |
![]() | MemberwiseClone() | |
![]() | ReadResources() | |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() | Reader | Indicates the IResourceReader used to read the resources. |
![]() | Table | The Hashtable in which the resources are stored. |
| Name | Description | |
|---|---|---|
![]() ![]() | IEnumerable::GetEnumerator() | Returns an IEnumerator object to avoid a race condition with Dispose. This member is not intended to be used directly from your code. |
| Name | Description | |
|---|---|---|
![]() | AsParallel() | Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.) |
![]() | AsQueryable() | Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.) |
![]() | Cast<TResult>() | Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.) |
![]() | OfType<TResult>() | Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.) |
The ResourceSet class enumerates over an IResourceReader, loading every name and value, and storing them in a Hashtable. A custom IResourceReader can be used.
You can instantiate a ResourceSet object that represents the resources of a specific culture by calling the ResourceManager::GetResourceSet method.
Important |
|---|
This type implements the IDisposable interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its Dispose method in a try/catch block. To dispose of it indirectly, use a language construct such as using (in C#) or Using (in Visual Basic). For more information, see the “Using an Object that Implements IDisposable” section in the IDisposable interface topic. |
Notes to Inheritors:
Derived classes of ResourceSet that use their own resource reader and writer should override GetDefaultReader, and GetDefaultWriter, to provide the appropriate functionality for interpreting the resource set.
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.





