Export (0) Print
Expand All

ResXResourceSet Class

Gathers all items that represent an XML resource (.resx) file into a single object.

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

Namespace:  System.Resources
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

[PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public class ResXResourceSet : ResourceSet

The ResXResourceSet type exposes the following members.

  NameDescription
Public methodResXResourceSet(Stream)Initializes a new instance of the ResXResourceSet class using the system default ResXResourceReader to read resources from the specified stream.
Public methodResXResourceSet(String)Initializes a new instance of a ResXResourceSet class using the system default ResXResourceReader that opens and reads resources from the specified file.
Top

  NameDescription
Public methodCloseCloses and releases any resources used by this ResourceSet. (Inherited from ResourceSet.)
Public methodDispose()Disposes of the resources (other than memory) used by the current instance of ResourceSet. (Inherited from ResourceSet.)
Protected methodDispose(Boolean)Releases resources (other than memory) associated with the current instance, closing internal managed objects if requested. (Inherited from ResourceSet.)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetDefaultReaderReturns the preferred resource reader class for this kind of ResXResourceSet. (Overrides ResourceSet.GetDefaultReader().)
Public methodGetDefaultWriterReturns the preferred resource writer class for this kind of ResXResourceSet. (Overrides ResourceSet.GetDefaultWriter().)
Public methodGetEnumeratorReturns an IDictionaryEnumerator that can iterate through the ResourceSet. (Inherited from ResourceSet.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetObject(String)Searches for a resource object with the specified name. (Inherited from ResourceSet.)
Public methodGetObject(String, Boolean)Searches for a resource object with the specified name in a case-insensitive manner, if requested. (Inherited from ResourceSet.)
Public methodGetString(String)Searches for a String resource with the specified name. (Inherited from ResourceSet.)
Public methodGetString(String, Boolean)Searches for a String resource with the specified name in a case-insensitive manner, if requested. (Inherited from ResourceSet.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodReadResourcesReads all the resources and stores them in a Hashtable indicated in the Table property. (Inherited from ResourceSet.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Protected fieldReaderIndicates the IResourceReader used to read the resources. (Inherited from ResourceSet.)
Protected fieldTableThe Hashtable in which the resources are stored. (Inherited from ResourceSet.)
Top

  NameDescription
Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorReturns an IEnumerator object to avoid a race condition with Dispose. This member is not intended to be used directly from your code. (Inherited from ResourceSet.)
Top

The ResXResourceSet class enumerates over an IResourceReader, loading every name and value, and storing them in a hash table.

A ResXResourceSet provides a convenient way to read all the resources in a .resx file into memory. You can use the GetObject method to retrieve a particular resource once the .resx file has been read into a ResXResourceSet.

For more information on the format of a .resx file, see Resources in .resx File Format.

Notes to Inheritors

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

.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:
© 2015 Microsoft