1

Asp.net Mvc 应用程序。在项目中有一个resource.resx 文件,其中有信息。从资源文件中,我想获取名称列表。大家可以帮帮我吗?

4

2 回答 2

4

ResourceManager.GetResourceManagerSet()您应该能够通过该方法遍历资源来做到这一点 。

有关更多信息,请参阅此问题...

于 2012-04-11T18:16:32.677 回答
1

试试这个代码

string[] fileEntries = Directory.GetFiles(Application.StartupPath.Replace("bin\\\Debug", "Resources"));
           foreach (string fileName in fileEntries)
               comboBox1.Items.Add(Path.GetFileName(fileName));
于 2014-04-15T16:08:46.543 回答