Export (0) Print
Expand All

ResourceSet Class

Stores all the resources localized for one particular culture, ignoring all other cultures, including any fallback rules.

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

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

The ResourceSet type exposes the following members.

  NameDescription
Protected methodSupported by the XNA FrameworkResourceSet()Initializes a new instance of the ResourceSet class with default properties.
Public methodSupported by the XNA FrameworkResourceSet(IResourceReader)Creates a new instance of the ResourceSet class using the specified resource reader.
Public methodSupported by the XNA FrameworkResourceSet(Stream)Creates a new instance of the ResourceSet class using the system default ResourceReader that reads resources from the given stream.
Public methodSupported by the XNA FrameworkResourceSet(String)Creates a new instance of the ResourceSet class using the system default ResourceReader that opens and reads resources from the given file.
Top

  NameDescription
Public methodSupported by the XNA FrameworkCloseCloses and releases any resources used by this ResourceSet.
Public methodSupported by the XNA FrameworkDispose()Disposes of the resources (other than memory) used by the current instance of ResourceSet.
Protected methodSupported by the XNA FrameworkDispose(Boolean)Releases resources (other than memory) associated with the current instance, closing internal managed objects if requested.
Public methodSupported by the XNA FrameworkEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by the XNA FrameworkFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by the XNA FrameworkGetDefaultReaderReturns the preferred resource reader class for this kind of ResourceSet.
Public methodGetDefaultWriterReturns the preferred resource writer class for this kind of ResourceSet.
Public methodSupported by the XNA FrameworkGetEnumeratorReturns an IDictionaryEnumerator that can iterate through the ResourceSet.
Public methodSupported by the XNA FrameworkGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodSupported by the XNA FrameworkGetObject(String)Searches for a resource object with the specified name.
Public methodSupported by the XNA FrameworkGetObject(String, Boolean)Searches for a resource object with the specified name in a case-insensitive manner, if requested.
Public methodSupported by the XNA FrameworkGetString(String)Searches for a String resource with the specified name.
Public methodSupported by the XNA FrameworkGetString(String, Boolean)Searches for a String resource with the specified name in a case-insensitive manner, if requested.
Public methodSupported by the XNA FrameworkGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by the XNA FrameworkMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodSupported by the XNA FrameworkReadResourcesReads all the resources and stores them in a Hashtable indicated in the Table property.
Public methodSupported by the XNA FrameworkToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public Extension MethodAsParallelEnables parallelization of a query. (Defined by ParallelEnumerable.)
Public Extension MethodAsQueryableConverts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension MethodSupported by the XNA FrameworkCast<TResult>Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension MethodSupported by the XNA FrameworkOfType<TResult>Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)
Top

  NameDescription
Protected fieldSupported by the XNA FrameworkReaderIndicates the IResourceReader used to read the resources.
Protected fieldSupported by the XNA FrameworkTableThe Hashtable in which the resources are stored.
Top

  NameDescription
Explicit interface implemetationPrivate methodSupported by the XNA FrameworkIEnumerable.GetEnumeratorReturns an IEnumerator object to avoid a race condition with Dispose. This member is not intended to be used directly from your code.
Top

The ResourceSet class enumerates over an IResourceReader, loading every name and value, and storing them in a Hashtable. A custom IResourceReader can be used.

See Encoding and Localization for details on the default resource file format.

Notes to Inheritors

Derived classes of ResourceSet using their own resource reader and writer should override GetDefaultReader, and GetDefaultWriter, to provide the appropriate functionality for interpreting the ResourceSet.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft