Declaration
public static ListSelectIterator<TInput, TInput> Reverse<TInput>(
this IList<TInput> source
)Summary
Inverts the order of the elements in a sequence.
Generic type parameters
| TInput |
The type of the elements of source. |
Parameters
| this IList<TInput> | source |
A list of values to reverse. |
Returns
A list whose elements correspond to those of the input sequence in reverse order.
Remarks
This method replaces
Enumerable.Reverse<TM1>(IEnumerable<TM1>) for the case where the
input is an
IList<T> with an implementation that makes a subsequent
ToArray() or
ToList() run 15% faster.