NeutralResourcesLanguageAttribute 构造函数

定义

初始化 NeutralResourcesLanguageAttribute 类的新实例。Initializes a new instance of the NeutralResourcesLanguageAttribute class.

重载

NeutralResourcesLanguageAttribute(String)

初始化 NeutralResourcesLanguageAttribute 类的新实例。Initializes a new instance of the NeutralResourcesLanguageAttribute class.

NeutralResourcesLanguageAttribute(String, UltimateResourceFallbackLocation)

使用指定的最终资源后备位置初始化 NeutralResourcesLanguageAttribute 类的新实例。Initializes a new instance of the NeutralResourcesLanguageAttribute class with the specified ultimate resource fallback location.

NeutralResourcesLanguageAttribute(String)

初始化 NeutralResourcesLanguageAttribute 类的新实例。Initializes a new instance of the NeutralResourcesLanguageAttribute class.

public:
 NeutralResourcesLanguageAttribute(System::String ^ cultureName);
public NeutralResourcesLanguageAttribute (string cultureName);
new System.Resources.NeutralResourcesLanguageAttribute : string -> System.Resources.NeutralResourcesLanguageAttribute
Public Sub New (cultureName As String)

参数

cultureName
String

用其编写的当前程序集的非特定语言资源的区域性的名称。The name of the culture that the current assembly's neutral resources were written in.

异常

cultureName 参数为 nullThe cultureName parameter is null.

注解

在 Windows 系统上可用的区域性名称的详细列表,请参阅语言标记中的列支持的 Windows 的语言/区域名称的列表For a detailed list of culture names available on Windows systems, see the Language tag column in the list of language/region names supported by Windows. 区域性名称遵循由定义的标准BCP 47Culture names follow the standard defined by BCP 47.

另请参阅

NeutralResourcesLanguageAttribute(String, UltimateResourceFallbackLocation)

使用指定的最终资源后备位置初始化 NeutralResourcesLanguageAttribute 类的新实例。Initializes a new instance of the NeutralResourcesLanguageAttribute class with the specified ultimate resource fallback location.

public:
 NeutralResourcesLanguageAttribute(System::String ^ cultureName, System::Resources::UltimateResourceFallbackLocation location);
public NeutralResourcesLanguageAttribute (string cultureName, System.Resources.UltimateResourceFallbackLocation location);
new System.Resources.NeutralResourcesLanguageAttribute : string * System.Resources.UltimateResourceFallbackLocation -> System.Resources.NeutralResourcesLanguageAttribute
Public Sub New (cultureName As String, location As UltimateResourceFallbackLocation)

参数

cultureName
String

用其编写的当前程序集的非特定语言资源的区域性的名称。The name of the culture that the current assembly's neutral resources were written in.

location
UltimateResourceFallbackLocation

枚举值之一,指示检索非特定后备资源的位置。One of the enumeration values that indicates the location from which to retrieve neutral fallback resources.

异常

cultureNamenullcultureName is null.

location 不是 UltimateResourceFallbackLocation 的成员。location is not a member of UltimateResourceFallbackLocation.

注解

使用NeutralResourcesLanguageAttribute构造函数与UltimateResourceFallbackLocation枚举来指定是否ResourceManager类是从主应用程序集 (默认值),或从指定的附属程序集检索非特定后备资源CurrentUICultureFallbackLocation属性。Use the NeutralResourcesLanguageAttribute constructor with the UltimateResourceFallbackLocation enumeration to specify whether the ResourceManager class is to retrieve neutral fallback resources from the main app assembly (the default), or from a satellite assembly specified by the CurrentUICulture and the FallbackLocation properties.

在 Windows 系统上可用的区域性名称的详细列表,请参阅语言标记中的列支持的 Windows 的语言/区域名称的列表For a detailed list of culture names available on Windows systems, see the Language tag column in the list of language/region names supported by Windows. 区域性名称遵循由定义的标准BCP 47Culture names follow the standard defined by BCP 47.

另请参阅

适用于