format
typescript
List.Swap(rhs)class: List
description
Swaps the elements in the current list with the elements in the specified list.
parameter
| param_name | type | description |
|---|---|---|
| rhs | List<T> | The specified list. |
reture
| type | description |
|---|---|
void |
code example
typescript
let list = new List<Number>(Number);
list.AddRange([100, 200, 300]);
let otherList = new List<Number>(Number);
otherList.AddRange([100, 10]);
// Swap the elements in list and otherList
list.Swap(otherList);