小编Vis*_*hal的帖子

在排序字典时出错

 private Dictionary<string, Dictionary<string, string>> sort(Dictionary<string,                                       Dictionary<string, string>> prods)
    {
        int a, b;
         var sortedDict =new Dictionary<string, Dictionary<string, string>>();
         sortedDict = from entry in prods orderby entry.Value["SortOrder"] ascending select entry;

        return sortedDict;
    }
Run Code Online (Sandbox Code Playgroud)

错误:

错误4无法将类型'System.Linq.IOrderedEnumerable >>'隐式转换为'System.Collections.Generic.Dictionary>'。存在显式转换(您是否缺少演员表?)

c# linq asp.net-mvc-4

1
推荐指数
1
解决办法
180
查看次数

标签 统计

asp.net-mvc-4 ×1

c# ×1

linq ×1