public void Sort(Comparison <T> comparison) { if (comparison == null) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match); } if (this._size <= 0) { return; } ArraySortHelper <T> .Sort(this._items, 0, this._size, comparison); }
public void Sort(Comparison <T> comparison) { if (comparison == null) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.comparison); } if (this._size > 1) { ArraySortHelper <T> .Sort(this._items, 0, this._size, comparison); } ++this._version; }
public void Sort(Comparison <T> comparison) { if (comparison == null) { throw new ArgumentNullException(nameof(comparison)); } Contract.EndContractBlock(); if (_size > 0) { ArraySortHelper <T> .Sort(_items, 0, _size, comparison); } }
public void Sort(Comparison <T> comparison) { if (comparison == null) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.comparison); } Contract.EndContractBlock(); if (_size > 1) { ArraySortHelper <T> .Sort(_items, 0, _size, comparison); } _version++; }
public void Sort(Comparison <T> comparison) { if (comparison == null) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match); } Contract.EndContractBlock(); if (_size > 0) { #if MONO ArraySortHelper <T> .Sort(_items, 0, _size, comparison); #else IComparer <T> comparer = new Array.FunctorComparer <T>(comparison); Array.Sort(_items, 0, _size, comparer); #endif } }