Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

List<T>.Sort Method

Sorts the elements in the List<T> or a portion of it.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method Sort() Sorts the elements in the entire List<T> using the default comparer.
Public method Sort(Comparison<T>) Sorts the elements in the entire List<T> using the specified System.Comparison<T>.
Public method Sort(IComparer<T>) Sorts the elements in the entire List<T> using the specified comparer.
Public method Sort(Int32, Int32, IComparer<T>) Sorts the elements in a range of elements in List<T> using the specified comparer.
Top

Community Additions

Show:
© 2017 Microsoft