System.Resources.Tools.StronglyTypedResourceBuilder Class

Provides support for strongly typed resources. This class cannot be inherited.

See Also: StronglyTypedResourceBuilder Members


public static class StronglyTypedResourceBuilder


Typically, resources separate code from content within an application. Creating and consuming these resources makes it easier to develop localizable applications. In the .NET Framework, resources are usually consumed by using the System.Resources.ResourceManager class, which contains methods that provide access to culture-specific resources at run time. For more information about creating and consuming resources, see Resources in Applications.

Strongly typed resource support is a compile-time feature that encapsulates access to resources by creating classes that contain a set of static, read-only (get) properties. This provides an alternative way to consume resources instead of calling the erload:System.Resources.ResourceManager.GetString and erload:System.Resources.ResourceManager.GetObject methods.

The basic functionality for strongly typed resource support is provided by the System.Resources.Tools.StronglyTypedResourceBuilder class (as well as the /str command-line option in the Resource File Generator (Resgen.exe)). The output of the erload:System.Resources.Tools.StronglyTypedResourceBuilder.Create method is a class that contains strongly typed properties that match the resources that are referenced in the input parameter. This class provides read-only access to the resources that are available in the file processed.


Namespace: System.Resources.Tools
Assembly: System.Design (in System.Design.dll)
Assembly Versions: