Linq style “For Each” [duplicate]
Using the ToList() extension method is your best option: someValues.ToList().ForEach(x => list.Add(x + 1)); There is no extension method in the BCL that implements ForEach directly. Although there’s no extension method in the BCL that does this, there is still an option in the System namespace… if you add Reactive Extensions to your project: using … Read more