Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class ListExtensions
- {
- public static void ForEach<T1, A1>(this List<T1> list, Func<T1, A1, bool> @if, Action<T1, A1> then, A1 arg1)
- {
- for (int i = 0; list != null && i < list.Count; ++i)
- {
- if (@if(list[i], arg1))
- {
- then(list[i], arg1);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment