0
我必須在剃刀視圖中以表格格式從應用程序資源文件中打印所有鍵值對。MVC 4剃鬚刀中的資源
我是新來的請幫幫我。
Resource.resx:
Key | value
---------------
name | John
mob | 9090909090
我必須在剃刀視圖中以表格格式從應用程序資源文件中打印所有鍵值對。MVC 4剃鬚刀中的資源
我是新來的請幫幫我。
Resource.resx:
Key | value
---------------
name | John
mob | 9090909090
要獲得所有從下面的方法應用程序資源使用鍵值對:
public Dictionary<string,string> gtresource()
{
System.Resources.ResourceManager RM = new System.Resources.ResourceManager("KDConsole.Resources.Resource", this.GetType().Assembly);
Dictionary<string, string> dic = new Dictionary<string, string>();
System.Resources.ResourceSet resourceSet = RM.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, true, true);
foreach (System.Collections.DictionaryEntry item in resourceSet)
{
dic.Add(item.Key.ToString(), item.Value.ToString());
}
return dic;
}