0
我有兩個List<T>
對象,我想交叉,但是嘗試時出現錯誤。在C#中交集兩個List <>#
// Make the Keys in the Dictionary<Load, double> _loads to form a List<Load>
List<Load> l1 = _loads.Keys.ToList();
// Get a list from my element.
List<Load> l2 = element.ListLoads;
// Intersect
List<Load> loads = (List<Load>)l1.Intersect<Load>(l2);