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.

Namespace:   System.Resources
Assembly:  mscorlib (in mscorlib.dll)

System.Object
  System.Resources.ResourceSet
    System.Resources.ResXResourceSet

[SerializableAttribute]
[ComVisibleAttribute(true)]
public class ResourceSet : IDisposable, IEnumerable

NameDescription
System_CAPS_protmethodResourceSet()

Initializes a new instance of the ResourceSet class with default properties.

System_CAPS_pubmethodResourceSet(IResourceReader)

Creates a new instance of the ResourceSet class using the specified resource reader.

System_CAPS_pubmethodResourceSet(Stream)

Creates a new instance of the ResourceSet class using the system default ResourceReader that reads resources from the given stream.

System_CAPS_pubmethodResourceSet(String)

Creates a new instance of the ResourceSet class using the system default ResourceReader that opens and reads resources from the given file.

NameDescription
System_CAPS_pubmethodClose()

Closes and releases any resources used by this ResourceSet.

System_CAPS_pubmethodDispose()

Disposes of the resources (other than memory) used by the current instance of ResourceSet.

System_CAPS_protmethodDispose(Boolean)

Releases resources (other than memory) associated with the current instance, closing internal managed objects if requested.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetDefaultReader()

Returns the preferred resource reader class for this kind of ResourceSet.

System_CAPS_pubmethodGetDefaultWriter()

Returns the preferred resource writer class for this kind of ResourceSet.

System_CAPS_pubmethodGetEnumerator()

Returns an IDictionaryEnumerator that can iterate through the ResourceSet.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetObject(String)

Searches for a resource object with the specified name.

System_CAPS_pubmethodGetObject(String, Boolean)

Searches for a resource object with the specified name in a case-insensitive manner, if requested.

System_CAPS_pubmethodGetString(String)

Searches for a String resource with the specified name.

System_CAPS_pubmethodGetString(String, Boolean)

Searches for a String resource with the specified name in a case-insensitive manner, if requested.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodReadResources()

Reads all the resources and stores them in a Hashtable indicated in the Table property.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_protfieldReader

Indicates the IResourceReader used to read the resources.

System_CAPS_protfieldTable

The Hashtable in which the resources are stored.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable.GetEnumerator()

Returns an IEnumerator object to avoid a race condition with Dispose. This member is not intended to be used directly from your code.

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast<TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<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.

System_CAPS_importantImportant

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.

.NET Framework
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.

Return to top
Show: