Assembly.GetSatelliteAssembly Assembly.GetSatelliteAssembly Assembly.GetSatelliteAssembly Assembly.GetSatelliteAssembly Method

定义

获取附属程序集。Gets the satellite assembly.

重载

GetSatelliteAssembly(CultureInfo, Version) GetSatelliteAssembly(CultureInfo, Version) GetSatelliteAssembly(CultureInfo, Version)

获取指定区域性的附属程序集的指定版本。Gets the specified version of the satellite assembly for the specified culture.

GetSatelliteAssembly(CultureInfo) GetSatelliteAssembly(CultureInfo) GetSatelliteAssembly(CultureInfo) GetSatelliteAssembly(CultureInfo)

获取指定区域性的附属程序集。Gets the satellite assembly for the specified culture.

GetSatelliteAssembly(CultureInfo, Version) GetSatelliteAssembly(CultureInfo, Version) GetSatelliteAssembly(CultureInfo, Version)

获取指定区域性的附属程序集的指定版本。Gets the specified version of the satellite assembly for the specified culture.

public:
 virtual System::Reflection::Assembly ^ GetSatelliteAssembly(System::Globalization::CultureInfo ^ culture, Version ^ version);
public virtual System.Reflection.Assembly GetSatelliteAssembly (System.Globalization.CultureInfo culture, Version version);
abstract member GetSatelliteAssembly : System.Globalization.CultureInfo * Version -> System.Reflection.Assembly
override this.GetSatelliteAssembly : System.Globalization.CultureInfo * Version -> System.Reflection.Assembly

参数

culture
CultureInfo CultureInfo CultureInfo CultureInfo

指定的区域性。The specified culture.

version
Version Version Version Version

附属程序集的版本。The version of the satellite assembly.

返回

指定的附属程序集。The specified satellite assembly.

实现

异常

找到了具有匹配的文件名的附属程序集,但 CultureInfo 或版本与所指定的不匹配。The satellite assembly with a matching file name was found, but the CultureInfo or the version did not match the one specified.

找不到该程序集。The assembly cannot be found.

附属程序集不是有效的程序集。The satellite assembly is not a valid assembly.

注解

附属程序集包含本地化资源, 这与主应用程序程序集不同, 后者包含为作为默认或非特定区域性的单个区域性提供的非本地化可执行代码和资源。Satellite assemblies contain localized resources, as distinct from main application assemblies, which contain non-localizable executable code and resources for a single culture that serve as the default or neutral culture.

GetSatelliteAssembly(CultureInfo)调用重载以使用当前程序集版本。Call the GetSatelliteAssembly(CultureInfo) overload to use your current assembly version.

如果versionnull, 则在对资源和主程序集进行签名时使用当前程序集版本。If version is null, the current assembly version is used if both the resource and main assemblies are signed.

GetSatelliteAssembly(CultureInfo) GetSatelliteAssembly(CultureInfo) GetSatelliteAssembly(CultureInfo) GetSatelliteAssembly(CultureInfo)

获取指定区域性的附属程序集。Gets the satellite assembly for the specified culture.

public:
 virtual System::Reflection::Assembly ^ GetSatelliteAssembly(System::Globalization::CultureInfo ^ culture);
public virtual System.Reflection.Assembly GetSatelliteAssembly (System.Globalization.CultureInfo culture);
abstract member GetSatelliteAssembly : System.Globalization.CultureInfo -> System.Reflection.Assembly
override this.GetSatelliteAssembly : System.Globalization.CultureInfo -> System.Reflection.Assembly
Public Overridable Function GetSatelliteAssembly (culture As CultureInfo) As Assembly

参数

culture
CultureInfo CultureInfo CultureInfo CultureInfo

指定的区域性。The specified culture.

返回

指定的附属程序集。The specified satellite assembly.

实现

异常

找不到该程序集。The assembly cannot be found.

找到了具有匹配文件名的附属程序集,但 CultureInfo 与所指定的不匹配。The satellite assembly with a matching file name was found, but the CultureInfo did not match the one specified.

附属程序集不是有效的程序集。The satellite assembly is not a valid assembly.

注解

附属程序集包含本地化资源, 这与主应用程序程序集不同, 后者包含为作为默认或非特定区域性的单个区域性提供的非本地化可执行代码和资源。Satellite assemblies contain localized resources, as distinct from main application assemblies, which contain non-localizable executable code and resources for a single culture that serve as the default or neutral culture.

调用此方法以使用您的当前程序集版本。Call this method to use your current assembly version.

适用于