I have one composite dictionary and one list
Dictionary<Point, List<int>> GroupedIndex
List<double> TobeMatched
Now I want to create new dictionary with same key but with Values mapped by corresponding index from the GroupedIndex int values with TobeMatched index
Example:
GroupedIndex: [0] -> Key [X=1;Y=1]; Values [0] -> 5, [1] -> 10
TobeMatched: [0] 0.23 [5] 0.345 [10] 1.23
Result expected:
New dictionary: [0] -> Key[X=1;Y=1]; Values [0] -> 0.345, [1] -> 1.23
is it possible to linq to achieve the result efficiently. For loop is very inefficient.
That’s how you do this with LINQ. But I doubt it will be faster compared to regular loops.