java: public void set(int index, long n) {if (count < index)throw new ArrayIndexOutOfBoundsException(index);else if (count == index)add(n);elseentries[index] = n;}
C#: public virtual void Set(int index, long n){if (count < index){throw Sharpen.Extensions.CreateIndexOutOfRangeException(index);}else{if (count == index){Add(n);}else{entries[index] = n;}}}