问题:
I'd like to do the equivalent of the following in LINQ, but I can't figure out how: 我想在LINQ中执行以下操作,但是我不知道如何操作:
IEnumerable<Item> items = GetItems();
items.ForEach(i => i.DoStuff());
What is the real syntax? 真正的语法是什么?
解决方案:
参考一: https://stackoom.com/question/qB4/LINQ相当于IEnumerable的foreach-T参考二: https://oldbug.net/q/qB4/LINQ-equivalent-of-foreach-for-IEnumerable-T
来源:oschina
链接:https://my.oschina.net/stackoom/blog/4336721