Example #1
0
 public ISliceable Slice(Context context, IntegerValue fi, IntegerValue li)
 {
     if (fi == null)
     {
         fi = new IntegerValue(1L);
     }
     if (fi.LongValue < 0)
     {
         throw new IndexOutOfRangeError();
     }
     if (li == null)
     {
         li = size();
     }
     if (li.LongValue < 0)
     {
         li = new IntegerValue(size().LongValue + 1 + li.LongValue);
     }
     else if (li.LongValue > size().LongValue)
     {
         throw new IndexOutOfRangeError();
     }
     return(newInstance((T)Item(fi), (T)Item(li)));
 }
Example #2
0
 public abstract IValue Item(IntegerValue index);