sequence.Where(x => x.Name.ToString().Equals("Apple")) .ToList() .ForEach( x => { if(someCondition) { // Do some stuff here. } });
items.ToList().ForEach(i => i.DoStuff());
someValues.ToList().ForEach(x => list.Add(x + 1));
myList.Where(l => l.Name.ToSting().Equals("Fortune")).ToList().ForEach(x => x.salary += deductions);