System.Collections.Generic.List<T>.Reverse Method
Reverses the order of the elements in the specified element range of the list.

Syntax

public void Reverse (int index, int count)

Parameters

index
The zero-based starting index of the range of elements to reverse.
count
The number of elements to reverse.

Exceptions

TypeReason
ArgumentException index + count is greater than stem.Collections.Generic.List<T>.Count.
ArgumentOutOfRangeException

index is less than zero.

-or-

count is less than zero.

Remarks

This method reverses the order of the elements in the specified element range

This method is an O(n) operation, where n is count.

Requirements

Namespace: System.Collections.Generic
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0