从引用的程序集中读取 .resx 文件名
我想从引用的程序集上的文件夹中检索可用的资源文件。我可以访问程序集并获取如下名称:
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetAssembly(typeof(AppResources));
string[] names = assembly.GetManifestResourceNames();
但这并没有提供我需要的名称,即 AppResources.resx、AppResources.en-US.resx 等。我如何读取这些名称?
多谢
I want to retrieve the available resource files from a folder on a referenced assembly. I can access the assembly and get the names like this:
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetAssembly(typeof(AppResources));
string[] names = assembly.GetManifestResourceNames();
But this doesn't give me the names I need, which are AppResources.resx, AppResources.en-US.resx, etc. How can I read those names?
Thanks a lot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将在 GetManifestResourceNames 中找到 AppResources.resx 作为
NamespaceOfAppResources 。应用程序资源。资源
语言特定资源不位于主程序集中。
请参阅处理程序集资源:
http://www.codeproject.com/KB/dotnet/Extracting_Embedded_Image.aspx
You will find AppResources.resx in GetManifestResourceNames as
NamespaceOfAppResources . AppResources . resources
language specific resources are not located in the main assembly.
See handling assembly resources:
http://www.codeproject.com/KB/dotnet/Extracting_Embedded_Image.aspx