示例#1
0
 public void Add(DictionaryItem item)
 {
     DictionaryItem[] newData = new DictionaryItem[GetLength() + 1];
     for (int i = 0; i < GetLength(); i++)
     {
         newData[i] = _data[i];
     }
     ;
     newData[GetLength()] = item;
     _data = newData;
 }
示例#2
0
 public void RemoveAt(int index)
 {
     if (index < GetLength())
     {
         DictionaryItem[] newData = new DictionaryItem[GetLength() - 1];
         for (int i = 0; i < index; i++)
         {
             newData[i] = _data[i];
         }
         for (int i = index; i < GetLength() - 1; i++)
         {
             newData[i] = _data[i + 1];
         }
         _data = newData;
     }
 }
示例#3
0
 public void Insert(DictionaryItem item)
 {
 }