Sort(Int32,Int32,IComparer) Method
Sorts the elements in a range of elements in System.Collections.ArrayList using the specified comparer.
Syntax
Parameters
- index
- The zero-based starting index of the range to sort.
- count
- The length of the range to sort.
- comparer
- The System.Collections.IComparer implementation to use when comparing elements.-or- A null reference (Nothing in Visual Basic) to use the System.IComparable implementation of each element.
Exceptions
Exception | Description |
---|---|
System.ArgumentOutOfRangeException | index is less than zero.-or- count is less than zero. |
System.ArgumentException | index and count do not specify a valid range in the System.Collections.ArrayList. |
System.NotSupportedException | The System.Collections.ArrayList is read-only. |
System.InvalidOperationException | An error occurred while comparing two elements. |
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also