List<T>.Sort Method (System.Collections.Generic)

Sorts the elements or a portion of the elements in the List&lt;T&gt; using either the specified or default IComparer&lt;T&gt; implementation or a provided Comparison&lt;T&gt; delegate to compare list elements.