我有两个List<T>
想要相交的对象,但在尝试时出现错误。
// 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);