有没有办法直接访问 .resx 中的字符串?
我有几个不同的项目,.resx 是使用 SharpDevelop 模板“Misc>>Empty resource file”创建的。
网上的大部分方法我都试过了,比如:
... = new ResourceManager ("ProjectEtc.resxFileName",
Assembly.GetExecutingAssembly)
但我收到同样的错误:
Could not find any resources appropriate for the specified culture or
neutral culture. Make sure "ProjectEtc.resxFileName.resources" was
correctly embedded or linked into assembly "Project calling" at compile time...
不管我做什么。
看来我需要将我的 .resx 也转换为 .resource 文件,我不想这样做。
我是否错过了使用#develop 模板的一些步骤?
等一下……这甚至是在 .NET 中存储常量字符串的最佳方式吗?
谢谢,戴恩