public static void Each <T>(IList <T> list, EachDelegate <T> each) { foreach (T element in list) { each(element); } }
public void Each(EachDelegate <T> func) { for (int i = 0; i < this.list.Count; i++) { func(this.list[i]); aaa(); } }
public List <int> each(EachDelegate MyDelegate) { List <int> res = new List <int>(); foreach (int item in _myList) { if (MyDelegate(item)) { res.Add(item); } } return(res); }