Sorts the elements in the entire
ObjectSet using
the specified comparer.
Syntax
| Visual Basic (Declaration) | |
|---|
Overloads Public Sub Sort( _
ByVal comparer As IComparer(Of T) _
) |
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As ObjectSet(Of T)
Dim comparer As IComparer(Of T)
instance.Sort(comparer)
|
| C# | |
|---|
public void Sort(
IComparer<T> comparer
) |
| Managed Extensions for C++ | |
|---|
public: void Sort(
IComparer<T>* comparer
) |
| C++/CLI | |
|---|
public:
void Sort(
IComparer<T>^ comparer
) |
Parameters
- comparer
- The IComparer implementation to use when comparing elements or null
to use the default comparer.
Exceptions
| Exception | Description |
| 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