예제 #1
0
파일: DoubleList.cs 프로젝트: Galad/Hanno
 public void Insert(int index, T item)
 {
     if (index <= _list.Count)
     {
         _list.Insert(index, item);
     }
     else if (index - _list.Count <= SecondaryList.Count)
     {
         SecondaryList.Insert(index - _list.Count, item);
     }
     else
     {
         throw new ArgumentOutOfRangeException("index", "Index is out of range");
     }
 }
예제 #2
0
파일: DoubleList.cs 프로젝트: Galad/Hanno
 public bool Remove(T item)
 {
     return(_list.Remove(item) || SecondaryList.Remove(item));
 }
예제 #3
0
파일: DoubleList.cs 프로젝트: Galad/Hanno
 public void Clear()
 {
     _list.Clear();
     SecondaryList.Clear();
 }