开发者

Convert object[] into Lookup with Linq

We have the following object[].

[0][1] = 'ABC'
   [2] = 123
   [3] = 456

[1][1] = 'DEF'
   [2] = 789
   [3] = 012

Is it possible to do a Select() and ToLookup() against this so that [i][3] would be my look开发者_Python百科up key and [1] [2] would be the value?


source.ToLookup(k => k[3], k => new object[] {k[1], k[2] });
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜