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] });
精彩评论