About BhashaIndia | Contribute | SiteMap | Register | Sign in to Windows Live ID
  Developers Patrons
Hindi Tamil Kannada Gujarati Marathi Telugu Bengali Malayalam Punjabi Konkani Oriya Sanskrit Nepali
Home > Developers > MSTech > Localizability > System.Resources namespace Welcome Guest!

System.Resources namespace

The System.Resources namespace contains classes to access, read and write resources.

The .NET Framework uses a hub and spoke model to package and deploy resources. The hub is the main assembly that contains the non-localizable executable code and the resources for a single culture, called the default culture.

The default culture is the fallback culture for the application. Each spoke connects to a satellite assembly that contains the resources for a single culture, but does not contain any code.

Classes used by System.Resources namespace

ResourceManager Class

The ResourceManager class provides resource fallback (typically to the neutral culture) when a localized resource does not exist, supports resource serialization, and provides the CreateFileBasedResourceManager method to allow access to resources that are not packaged in your assembly. Developers can also derive classes from ResourceManager when creating custom resource solutions.

ResourceWriter Class

The ResourceWriter class writes resources in the system's default format to an output file or stream. Resources are specified as name-value pairs using the AddResource method. Resource names are case-sensitive when used for lookups, but a ResourceWriter does not write a resource name to a .resources file if that name varies only by case. The ResourceWriter class provides a default implementation of the IResourceWriter interface and can be overridden by the developer in order to write custom resources.

ResourceReader Class

The ResourceReader class enumerates .resources files and streams, and reads sequential resource name-value pairs. This class provides a default implementation of the IResourceReader interface which, like the ResourceWriter class, the developer can override.

ResourceSet Class

The ResourceSet class stores all resources that are localized for one particular culture. All resources are immediately loaded into memory. Unlike the ResourceManager, the ResourceSet does not fall back. Because of this, the ResourceSet is useful primarily when creating tools and utilities but not in localized applications. The ResourceSet can also be used to control resource caching (for example, to prevent caching images).

Partner Profile | Privacy Statement | Why Passport | Testimonials
This site uses Unicode for non-English characters and uses Open Type fonts.
©2003-2007 Microsoft Corporation. All rights reserved.