Exemple #1
0
        private int RandomAccessCompareTo(IComparer <AnyValue> comparator, ListValue otherList)
        {
            int x = Integer.compare(this.Length(), otherList.Length());

            if (x == 0)
            {
                for (int i = 0; i < Length(); i++)
                {
                    x = comparator.Compare(this.Value(i), otherList.Value(i));
                    if (x != 0)
                    {
                        return(x);
                    }
                }
            }

            return(x);
        }