Method Swap
Swap<T>(ref T, ref T)
Swaps the values of the given arguments.
Declaration
public static void Swap<T>(ref T a, ref T b)
Parameters
| Type | Name | Description |
|---|---|---|
| T | a | First value. |
| T | b | Second value. |
Type Parameters
| Name | Description |
|---|---|
| T | Any type. Works both for value types and reference types. |