Guest User

Untitled

a guest
Feb 17th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. public static class ListExtensions
  2. {
  3. public static void ForEach<T1, A1>(this List<T1> list, Func<T1, A1, bool> @if, Action<T1, A1> then, A1 arg1)
  4. {
  5. for (int i = 0; list != null && i < list.Count; ++i)
  6. {
  7. if (@if(list[i], arg1))
  8. {
  9. then(list[i], arg1);
  10. }
  11. }
  12. }
  13. }
Add Comment
Please, Sign In to add comment