Share via


BorrowedList<TElement>.Sort Method

Definition

Overloads

Sort()

Sort the elements in the BorrowedList<TElement> using the default comparer for TElement.

Sort(IComparer<TElement>)

Sort the elements in the BorrowedList<TElement> using comparer.

Sort(Comparison<TElement>)

Sort the elements in the BorrowedList<TElement> using comparer.

Sort(Int32, Int32, IComparer<TElement>)

Sort the elements in the BorrowedList<TElement> using comparer.

Sort(Int32, Int32, Comparison<TElement>)

Sort the elements in the BorrowedList<TElement> using comparer.

Sort()

Sort the elements in the BorrowedList<TElement> using the default comparer for TElement.

public void Sort();
member this.Sort : unit -> unit
Public Sub Sort ()

Applies to

Sort(IComparer<TElement>)

Sort the elements in the BorrowedList<TElement> using comparer.

public void Sort(System.Collections.Generic.IComparer<TElement> comparer);
member this.Sort : System.Collections.Generic.IComparer<'Element> -> unit
Public Sub Sort (comparer As IComparer(Of TElement))

Parameters

comparer
IComparer<TElement>

The IComparer<T> to use to compare elements.

Applies to

Sort(Comparison<TElement>)

Sort the elements in the BorrowedList<TElement> using comparer.

public void Sort(Comparison<TElement> comparer);
member this.Sort : Comparison<'Element> -> unit
Public Sub Sort (comparer As Comparison(Of TElement))

Parameters

comparer
Comparison<TElement>

The Comparison<T> to use to compare elements.

Applies to

Sort(Int32, Int32, IComparer<TElement>)

Sort the elements in the BorrowedList<TElement> using comparer.

public void Sort(int index, int count, System.Collections.Generic.IComparer<TElement> comparer);
member this.Sort : int * int * System.Collections.Generic.IComparer<'Element> -> unit
Public Sub Sort (index As Integer, count As Integer, comparer As IComparer(Of TElement))

Parameters

index
Int32

The zero-based starting index of the range to sort.

count
Int32

The length of the range to sort.

comparer
IComparer<TElement>

The IComparer<T> to use to compare elements.

Applies to

Sort(Int32, Int32, Comparison<TElement>)

Sort the elements in the BorrowedList<TElement> using comparer.

public void Sort(int index, int count, Comparison<TElement> comparer);
member this.Sort : int * int * Comparison<'Element> -> unit
Public Sub Sort (index As Integer, count As Integer, comparer As Comparison(Of TElement))

Parameters

index
Int32

The zero-based starting index of the range to sort.

count
Int32

The length of the range to sort.

comparer
Comparison<TElement>

The Comparison<T> to use to compare elements.

Applies to