public ListCtl <T> child(int startIdx, int count = -1) { List <T> temp = new List <T>(); // int len = 0; if (count < 0) { len = data.Count; } else { len = Math.Min(startIdx + count, data.Count); } // for (int i = startIdx; i < len; ++i) { temp.Add(data[i]); } // ListCtl <T> result = new ListCtl <T>(); result.data = temp; return(result); }
public static ListCtl <T> operator +(ListCtl <T> c1, ListCtl <T> c2) { ListCtl <T> result = new ListCtl <T>(); //result.lstData = c1.lstData; for (int i = 0; i < c1.data.Count; ++i) { result.data.Add(c1.data[i]); } for (int i = 0; i < c2.data.Count; ++i) { result.data.Add(c2.data[i]); } return(result); }