Esempio n. 1
0
 public void Add(InvObject obj)
 {
     if (Used < totalSize)
     {
         arr[Used] = obj;
     }
     Used++;
 }
Esempio n. 2
0
 public void Insert(int position, InvObject obj)
 {
     if (position == Used + 1)
     {
         arr[position] = obj;
     }
     if (position <= Used)
     {
         int x = 0;
         while (position + x < Used)
         {
             arr[Used - x] = arr[Used - 1 - x];
             x++;
         }
         arr[position] = obj;
         Used++;
     }
 }