ResourceSet Class

July 28, 2014

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

System.Object
  System.Resources.ResourceSet

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

public class ResourceSet : IEnumerable, 
	IDisposable

The ResourceSet type exposes the following members.

  NameDescription
Protected methodResourceSet()Initializes a new instance of the ResourceSet class with default properties.
Public methodResourceSet(IResourceReader)Creates a new instance of the ResourceSet class using the specified resource reader.
Public methodResourceSet(Stream)Security Critical. Creates a new instance of a ResourceSet class that reads resources from the given stream.
Public methodResourceSet(String)Security Critical. Creates a new instance of the ResourceSet class that opens and reads resources from the given file.
Top

  NameDescription
Public methodCloseCloses and releases any resources used by this ResourceSet.
Public methodDispose()Disposes of the resources (other than memory) used by the current instance of ResourceSet.
Protected methodDispose(Boolean)Releases resources (other than memory) associated with the current instance, closing internal managed objects if requested.
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 the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetDefaultReaderReturns the preferred resource reader class for this kind of ResourceSet.
Public methodGetEnumeratorReturns an IDictionaryEnumerator that can iterate through the 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.
Public methodGetObject(String, Boolean)Searches for a resource object with the specified name in a case-insensitive manner, if requested.
Public methodGetString(String)Searches for a String resource with the specified name.
Public methodGetString(String, Boolean)Searches for a String resource with the specified name in a case-insensitive manner, if requested.
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.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public Extension MethodAsQueryableConverts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension MethodCast<TResult>Converts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension MethodOfType<TResult>Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)
Top

  NameDescription
Protected fieldReaderIndicates the IResourceReader used to read the resources.
Top

  NameDescription
Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorReturns an IEnumerator in order 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. A custom IResourceReader can be used.

Notes to Inheritors

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

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

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

Show:
© 2014 Microsoft