【发布时间】:2012-04-23 12:15:43
【问题描述】:
Asp.net Mvc 应用程序。 在项目中有一个resource.resx 文件,其中有信息。 从资源文件中我想获取名称列表。 大家可以帮帮我吗?
【问题讨论】:
标签: c# asp.net-mvc resx
Asp.net Mvc 应用程序。 在项目中有一个resource.resx 文件,其中有信息。 从资源文件中我想获取名称列表。 大家可以帮帮我吗?
【问题讨论】:
标签: c# asp.net-mvc resx
您应该能够通过ResourceManager.GetResourceManagerSet() 方法遍历资源来做到这一点。
更多信息见this question ...
【讨论】:
试试这个代码
string[] fileEntries = Directory.GetFiles(Application.StartupPath.Replace("bin\\\Debug", "Resources"));
foreach (string fileName in fileEntries)
comboBox1.Items.Add(Path.GetFileName(fileName));
【讨论】: