Ejemplo n.º 1
0
 public Ar Splice(int start, int numberOf, params dynamic[] toAdd)
 {
     Ar newAr = new Ar();
     if (start < 0) start = this.Count + start;
     for (int i = start + numberOf - 1; i >= start; i--)
     {
         if (i >= this.Count) continue;
         newAr.Unshift(this[i]);
         this.RemoveAt(i);
     }
     for (int i = toAdd.Length - 1; i >= 0; i--)
     {
         this.Insert(start, toAdd[i]);
     }
     return newAr;
 }