List<> .ForEach not found [duplicate]
问题 This question already has answers here : Is the List<T>.ForEach() method gone? (3 answers) Closed 6 years ago . I am porting a Windows Phone app to Win 8, and I have found this stumbling block, but cant find the solution. I have a: List<items> tempItems = new List<items>(); and ObservableCollection<items> chemists = new ObservableCollection<items>(); I have added items to my tempItems etc, so then I do this: tempItems.OrderBy(i => i.Distance) .Take(20) .ToList() .ForEach(z => chemists.Add(z))