LINQ in Action roller

Combining two IEnumerable<T>-s with parallel traversal

I would like to write such code without foreach which calculates the following: // assume that the lists are equal length given IEnumerable a = {1,2,3}; IEnumerable b = {3,4,5}; I would like to get IEnumerable c = {1+3, 2+4, 3+5}; by writing down something similar to this: var c = a.Combine(b, (a_i, b_i) => a_i + b_i); another usage of this would be: given IEnumerable a = {1,2,3,4,5,6,7}; IEnumerable b = new bool[]{true, true, false, true, false, false, true}; I would like to get IEnumerable c = Read More...
Published Friday, November 28, 2008 7:09 PM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication