System.Resources Namespace
The System.Resources namespace provides classes and interfaces that allow developers to create, store, and manage various culture-specific resources used in an application. One of the most important classes of the System.Resources namespace is the ResourceManager class.
The ResourceManager class allows the user to access and control resources stored in the main assembly or in resource satellite assemblies. Use the ResourceManager.GetObject and ResourceManager.GetString methods to retrieve culture-specific objects and strings.
Classes
| Class | Description |
|---|---|
| MissingManifestResourceException | The exception thrown if the main assembly does not contain the resources for the neutral culture, and they are required because of a missing appropriate satellite assembly. |
| NeutralResourcesLanguageAttribute | Informs the ResourceManager of the neutral culture of an assembly. This class cannot be inherited. |
| ResourceManager | Provides convenient access to culture-specific resources at runtime. |
| ResourceReader | Enumerates .resources files and streams, reading sequential resource name and value pairs. |
| ResourceSet | Stores all the resources localized for one particular culture, ignoring all other cultures, including any fallback rules. |
| ResourceWriter | Writes resources in the system-default format to an output file or an output stream. |
| ResXFileRef | Represents a link to an external resource. |
| ResXFileRef.Converter | Provides a type converter to convert data for a ResXFileRef to and from a string. |
| ResXResourceReader | Enumerates XML resource (.resx) files and streams, and reads the sequential resource name and value pairs. |
| ResXResourceSet | Gathers all items that represent an XML resource (.resx) file into a single object. |
| ResXResourceWriter | Writes resources in an XML resource (.resx) file or an output stream. |
| SatelliteContractVersionAttribute | Instructs the ResourceManager to ask for a particular version of a satellite assembly to simplify updates of the main assembly of an application. |
Interfaces
| Interface | Description |
|---|---|
| IResourceReader | Provides the base functionality to read data from resource files. |
| IResourceWriter | Provides functionality to write resources to an output file or stream. |