format
typescript
Queue.Swap(rhs)class: Queue
description
Swaps the elements in the current queue with the elements in the specified queue.
parameter
| param_name | type | description |
|---|---|---|
| rhs | Queue<T> | The specified queue. |
reture
| type | description |
|---|---|
void |
code example
typescript
let queue = new Queue<Number>();
for (let index = 0; index < 3; index++) {
queue.Enqueue(index);
}
let other = new Queue<Number>();
other.Enqueue(100);
queue.Swap(other);