System.Resources 命名空間

System.Resources 命名空間提供類別和介面,可以讓開發人員建立、儲存和管理應用程式中所用的各種特定文化特性的資源。 The System.Resources namespace provides classes and interfaces that allow developers to create, store, and manage various culture-specific resources used in an application. System.Resources 命名空間的其中一個最重要類別是 ResourceManager 類別。 One of the most important classes of the System.Resources namespace is the ResourceManager class.

類別

MissingManifestResourceException

如果主要組件沒有包含中性文化特性 (Culture) 的資源,且遺漏適當的附屬組件,所擲回的例外狀況。The exception that is thrown if the main assembly does not contain the resources for the neutral culture, and an appropriate satellite assembly is missing.

MissingSatelliteAssemblyException

當預設文化特性之資源的附屬組件遺漏時,所擲回的例外狀況。The exception that is thrown when the satellite assembly for the resources of the default culture is missing.

NeutralResourcesLanguageAttribute

通知資源管理員有關應用程式的預設文化特性。Informs the resource manager of an app's default culture. 這個類別無法被繼承。This class cannot be inherited.

ResourceManager

表示在執行階段提供特定文化特性資源存取權限的資源管理員。Represents a resource manager that provides convenient access to culture-specific resources at run time.

ResourceReader

讀取循序資源名稱/值組,以列舉二進位資源 (.resources) 檔案中的資源。Enumerates the resources in a binary resources (.resources) file by reading sequential resource name/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. 這個類別無法被繼承。This class cannot be inherited.

ResXDataNode

表示 XML 資源檔 (.resx) 中的項目。Represents an element in an XML resource (.resx) file.

ResXFileRef

表示外部資源的連結。Represents a link to an external resource.

ResXFileRef.Converter

提供型別轉換子 (Type Converter),將 ResXFileRef 的資料與字串相互轉換。Provides a type converter to convert data for a ResXFileRef to and from a string.

ResXResourceReader

列舉 XML 資源 (.resx) 檔和資料流,並讀取資源的循序名稱值配對。Enumerates XML resource (.resx) files and streams, and reads the sequential resource name and value pairs.

ResXResourceSet

表示 XML 資源 (.resx) 檔中的所有資源。Represents all resources in an XML resource (.resx) file.

ResXResourceWriter

寫入資源至 XML 資源 (.resx) 檔或輸出資料流。Writes resources in an XML resource (.resx) file or an output stream.

SatelliteContractVersionAttribute

指示 ResourceManager 物件要求特定版本的附屬組件。Instructs a ResourceManager object to ask for a particular version of a satellite assembly.

介面

IResourceReader

提供從資源檔讀取資料的基本功能。Provides the base functionality for reading data from resource files.

IResourceWriter

提供將資源寫入輸出檔或資料流的基本功能。Provides the base functionality for writing resources to an output file or stream.

列舉

UltimateResourceFallbackLocation

指定 ResourceManager 物件會在主要組件或附屬組件中尋找應用程式預設文化特性的資源。Specifies whether a ResourceManager object looks for the resources of the app's default culture in the main assembly or in a satellite assembly.

備註

ResourceManager類別可讓使用者存取及控制儲存在主要組件或資源附屬組件中的資源。The ResourceManager class allows the user to access and control resources stored in the main assembly or in resource satellite assemblies. 使用GetObjectGetString方法來擷取特定文化特性的物件和字串。Use the GetObject and GetString methods to retrieve culture-specific objects and strings.