gpt4 book ai didi

c# - 从引用的程序集中读取 .resx 文件名

转载 作者:行者123 更新时间:2023-11-30 18:40:06 25 4
gpt4 key购买 nike

我想从引用程序集的文件夹中检索可用的资源文件。我可以访问程序集并获取这样的名称:

System.Reflection.Assembly assembly = System.Reflection.Assembly.GetAssembly(typeof(AppResources));
string[] names = assembly.GetManifestResourceNames();

但这并没有给我所需的名称,即 AppResources.resx、AppResources.en-US.resx 等。我如何读取这些名称?

非常感谢

最佳答案

您将在 GetManifestResourceNames 中找到 AppResources.resx

命名空间应用资源。应用资源。资源

特定于语言的资源不在主程序集中。

查看处理程序集资源: http://www.codeproject.com/KB/dotnet/Extracting_Embedded_Image.aspx

关于c# - 从引用的程序集中读取 .resx 文件名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8756592/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com