Sorts the elements in a range of elements in
ObjectSet
using the specified comparer.
Syntax
| Visual Basic (Declaration) | |
|---|
Overloads Public Sub Sort( _
ByVal index As Integer, _
ByVal count As Integer, _
ByVal comparer As IComparer(Of T) _
) |
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As ObjectSet(Of T)
Dim index As Integer
Dim count As Integer
Dim comparer As IComparer(Of T)
instance.Sort(index, count, comparer)
|
| Managed Extensions for C++ | |
|---|
public: void Sort(
int index,
int count,
IComparer<T>* comparer
) |
Parameters
- index
- The zero-based starting index of the range to sort.
- count
- The length of the range to sort.
- comparer
- The IComparer implementation to use when comparing elements or null
to use the default comparer.
Exceptions
| Exception | Description |
| ArgumentOutOfRangeException | Index is less than zero or count is less
than zero. |
| ArgumentException | Index and count do not specify a valid range in the
ObjectSet. |
| InvalidOperationException | Comparar is null and the default comparer
cannot find an IComparable implementation for type T. |
Requirements
Platforms: Windows 2000, Windows XP family, Windows Server 2003 family, Windows Vista family
See Also