Table of Contents

Method Swap

Namespace
Pinwheel.Vista
Assembly
Pinwheel.Vista.Runtime.dll

Swap<T>(ref T, ref T)

Swaps two values in place.

public static void Swap<T>(ref T a, ref T b)

Parameters

a T

First value to swap.

b T

Second value to swap.

Type Parameters

T

Type of the values being swapped.

Swap<T>(ref T[], int, int)

Swaps two elements inside the same array.

public static void Swap<T>(ref T[] array, int i0, int i1)

Parameters

array T[]

Array containing both elements.

i0 int

Index of the first element.

i1 int

Index of the second element.

Type Parameters

T

Element type stored in the array.