Exemple #1
0
 private void PerformSort()
 {
     // If the source contains just zero or one element, there's no need to sort
     if (_elements.Length <= 1)
     {
         return;
     }
     _context.Initialize(_elements);
     // Then sorts the elements according to the collected
     // key values and the selected ordering
     Sort(0, _indexes.Length - 1);
 }
Exemple #2
0
        void PerformSort()
        {
            // If the source contains just zero or one element, there's no need to sort
            if (elements.Length <= 1)
            {
                return;
            }

            context.Initialize(elements);

            // Then sorts the elements according to the collected
            // key values and the selected ordering
            Array.Sort <int> (indexes, context);
        }