Vector<T>.SwapElements Method

Exchanges two elements of the vector.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
public void SwapElements(
	int index1,
	int index2
)

Parameters

index1  Int32
The index of the first element.
index2  Int32
The index of the second element.

Exceptions

ArgumentOutOfRangeException

index1 is less than zero or greater than or equal to the length of the vector.

-or-

index2 is less than zero or greater than or equal to the length of the vector.

See Also