How to get values from nested Dictionary using LINQ. Keys in the Dictionary are integer. Values of Dictionary are list of lists. Seconday level list is a list of array holding integer value. Thanks in advance.
views:
80answers:
1
+1
A:
Dictionary<int, List<List<int[]>>> dictionary = ...
var values = dictionary.Values.SelectMany(x => x.SelectMany(y => y.SelectMany(z => z));
Edit: Didn't realize it was a list of lists, so modified to account for that.
Kirk Woll
2010-09-24 02:58:21
@Kirk Woll: it should be in this way, Dictionary<int, List<List<Int[]>>>
Ravi
2010-09-24 03:04:10
Thanks Kirk Woll it worked. This is fantastic place to get queries answered quick.
Ravi
2010-09-24 03:26:43