Udostępnij za pośrednictwem


LinkedElementCollection<T>.Sort Method

Definition

Overloads

Sort(Int32, Int32, IComparer<T>)

Sorts the elements in a range of the linked element collection using the specified comparer.

Sort(Comparison<T>)

Sorts the elements in the entire linked element collection using the specified System.Comparison<T>.

Sort()

Sorts the elements in the entire linked element collection.

Sort(IComparer<T>)

Sorts the elements in the entire linked element collection using the specified comparer.

Sort(Int32, Int32, IComparer<T>)

Sorts the elements in a range of the linked element collection using the specified comparer.

public:
 void Sort(int index, int count, System::Collections::Generic::IComparer<T> ^ comparer);
public void Sort (int index, int count, System.Collections.Generic.IComparer<T> comparer);
member this.Sort : int * int * System.Collections.Generic.IComparer<'T (requires 'T :> Microsoft.VisualStudio.Modeling.ModelElement)> -> unit
Public Sub Sort (index As Integer, count As Integer, comparer As IComparer(Of T))

Parameters

index
Int32

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

count
Int32

The length of the range to sort.

comparer
IComparer<T>

The System.Collections.Generic.IComparer<T> implementation to use when comparing. elements, or null to use the default comparer System.Collections.Generic.Comparer<T>.Default.

Applies to

Sort(Comparison<T>)

Sorts the elements in the entire linked element collection using the specified System.Comparison<T>.

public:
 void Sort(Comparison<T> ^ comparison);
public void Sort (Comparison<T> comparison);
member this.Sort : Comparison<'T (requires 'T :> Microsoft.VisualStudio.Modeling.ModelElement)> -> unit
Public Sub Sort (comparison As Comparison(Of T))

Parameters

comparison
Comparison<T>

The System.Comparison<T> to use when comparing elements.

Exceptions

comparison is null.

Applies to

Sort()

Sorts the elements in the entire linked element collection.

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

Applies to

Sort(IComparer<T>)

Sorts the elements in the entire linked element collection using the specified comparer.

public:
 void Sort(System::Collections::Generic::IComparer<T> ^ comparer);
public void Sort (System.Collections.Generic.IComparer<T> comparer);
member this.Sort : System.Collections.Generic.IComparer<'T (requires 'T :> Microsoft.VisualStudio.Modeling.ModelElement)> -> unit
Public Sub Sort (comparer As IComparer(Of T))

Parameters

comparer
IComparer<T>

The System.Collections.Generic.IComparer<T> implementation to use when comparing. elements, or null to use the default comparer System.Collections.Generic.Comparer<T>.Default.

Applies to