how to use linq instead of foreach code example Example: foreach c# linq example items.ToList().ForEach(i => i.DoStuff());