ImmutableList<T>.Sort Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Sort() |
Sorts the elements in the entire immutable list using the default comparer. |
Sort(IComparer<T>) |
Sorts the elements in the entire immutable list using the specified comparer. |
Sort(Comparison<T>) |
Sorts the elements in the entire immutable list using the specified comparer. |
Sort(Int32, Int32, IComparer<T>) |
Sorts a range of elements in the immutable list using the specified comparer. |
Sort()
- Source:
- ImmutableList_1.cs
- Source:
- ImmutableList_1.cs
- Source:
- ImmutableList_1.cs
Sorts the elements in the entire immutable list using the default comparer.
public:
System::Collections::Immutable::ImmutableList<T> ^ Sort();
public System.Collections.Immutable.ImmutableList<T> Sort ();
member this.Sort : unit -> System.Collections.Immutable.ImmutableList<'T>
Public Function Sort () As ImmutableList(Of T)
Returns
The sorted list.
Applies to
Sort(IComparer<T>)
- Source:
- ImmutableList_1.cs
- Source:
- ImmutableList_1.cs
- Source:
- ImmutableList_1.cs
Sorts the elements in the entire immutable list using the specified comparer.
public:
System::Collections::Immutable::ImmutableList<T> ^ Sort(System::Collections::Generic::IComparer<T> ^ comparer);
public System.Collections.Immutable.ImmutableList<T> Sort (System.Collections.Generic.IComparer<T> comparer);
public System.Collections.Immutable.ImmutableList<T> Sort (System.Collections.Generic.IComparer<T>? comparer);
member this.Sort : System.Collections.Generic.IComparer<'T> -> System.Collections.Immutable.ImmutableList<'T>
Public Function Sort (comparer As IComparer(Of T)) As ImmutableList(Of T)
Parameters
- comparer
- IComparer<T>
The implementation to use when comparing elements, or null
to use the default comparer (Default).
Returns
The sorted list.
Applies to
Sort(Comparison<T>)
- Source:
- ImmutableList_1.cs
- Source:
- ImmutableList_1.cs
- Source:
- ImmutableList_1.cs
Sorts the elements in the entire immutable list using the specified comparer.
public:
System::Collections::Immutable::ImmutableList<T> ^ Sort(Comparison<T> ^ comparison);
public System.Collections.Immutable.ImmutableList<T> Sort (Comparison<T> comparison);
member this.Sort : Comparison<'T> -> System.Collections.Immutable.ImmutableList<'T>
Public Function Sort (comparison As Comparison(Of T)) As ImmutableList(Of T)
Parameters
- comparison
- Comparison<T>
The delegate to use when comparing elements.
Returns
The sorted list.
Exceptions
comparison
is null
.
Applies to
Sort(Int32, Int32, IComparer<T>)
- Source:
- ImmutableList_1.cs
- Source:
- ImmutableList_1.cs
- Source:
- ImmutableList_1.cs
Sorts a range of elements in the immutable list using the specified comparer.
public:
System::Collections::Immutable::ImmutableList<T> ^ Sort(int index, int count, System::Collections::Generic::IComparer<T> ^ comparer);
public System.Collections.Immutable.ImmutableList<T> Sort (int index, int count, System.Collections.Generic.IComparer<T> comparer);
public System.Collections.Immutable.ImmutableList<T> Sort (int index, int count, System.Collections.Generic.IComparer<T>? comparer);
member this.Sort : int * int * System.Collections.Generic.IComparer<'T> -> System.Collections.Immutable.ImmutableList<'T>
Public Function Sort (index As Integer, count As Integer, comparer As IComparer(Of T)) As ImmutableList(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 implementation to use when comparing elements, or null
to use the default comparer (Default).
Returns
The sorted list.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應