Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: IEnumerable<TResult> Reversed<TResult>(this IEnumerable<TResult>)

Declaration

public static IEnumerable<TResult> Reversed<TResult>(
    this IEnumerable<TResult> source
)

Summary

Inverts the order of the elements in a sequence.

Generic type parameters

TResult The type of the elements of source.

Parameters

this IEnumerable<TResult>source A sequence of values to reverse.

Returns

A sequence whose elements correspond to those of the input sequence in reverse order.

Remarks

This just calls Enumerable.Reverse<TM1>(IEnumerable<TM1>). The motivation for this is to call this as an extension method without running into clashes with List<T>.Reverse and similar future in-place reverse methods.