У меня есть 3 коллекции с точно такими же подсчетами элементов.
Мне нужно создать новую коллекцию на основе этих трех значений элементов коллекции.
Пример:
List<double> list1;
List<double> list2;
List<double> list3;
List<Item> list4;
public class Item
{
public double Value1{get;set;}
public double Value2{get;set;}
public double Value3{get;set;}
}
Я пытаюсь добиться этого с помощью Linq.
Я пробовал:
var query = from pt in list1
from at in list2
from ct in list3
select new Item
{
Value1 = pt,
Value2 = at,
Value3 = ct
};
Но у меня есть OutOfMemoryException, мои 3 списка огромны.
Любая помощь?