HKMBFZ/Assets/SKFramework/Core/Extension/IEnumerableExtension.cs

17 lines
369 B
C#

using System;
using System.Collections.Generic;
namespace SK.Framework
{
public static class IEnumerableExtension
{
public static IEnumerable<T> ForEach<T>(this IEnumerable<T> self, Action<T> action)
{
foreach (var item in self)
{
action(item);
}
return self;
}
}
}