日期:2014-05-17 浏览次数:21104 次
 List<int> date = new List<int>();
            date.Add(1);
            List<int> temp = date.GetRange(0, 1);
            temp[0] = 2;
class SubList<T>
{
    private List<T> innerList { get; set; }
    private int offset { get; set; }
    public SubList(List<T> list, int startindex) { innerList = list; offset = startindex; }
    public T this[int index] { get { return innerList[index + startindex]; } set { innerList[index + startindex] = value; } }
}
...
List<int> date = new List<int>();
date.Add(1);
SubList<int> temp = new SubList<int>(date, 0);
temp[0] = 2;
------解决方案--------------------
直接copy 不知道行不行