Esempio n. 1
0
 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");
     }
 }
Esempio n. 2
0
 public bool Remove(T item)
 {
     return(_list.Remove(item) || SecondaryList.Remove(item));
 }
Esempio n. 3
0
 public void Clear()
 {
     _list.Clear();
     SecondaryList.Clear();
 }