*
This commit is contained in:
1 parent
ff8cbe2ccc
commit
6e0c722be1
2 files changed
+2
-1
No files matched your search
@@ -166,7 +166,7 @@ public static class EnumerableExtensions {
|
||||
/// <summary>
|
||||
/// 对集合的每个元素执行指定操作。
|
||||
/// </summary>
|
||||
public static IEnumerable<T> ForEach<T>(this IEnumerable<T> source, Action<T> action) {
|
||||
public static IEnumerable<T> ForAll<T>(this IEnumerable<T> source, Action<T> action) {
|
||||
foreach (T item in source) action(item);
|
||||
return source;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user