clear

Summary

Clears the queue by removing all elements from the queue.

Usage

public void clear()

Description

Clears the queue by removing all elements from the queue.

Examples

Basic Usage
1
2
3
4
5
6
import System;
 
auto queue = new Queue<int>([ 1, 2, 3 ]);
Console.log(queue.length); // 3
queue.clear();
Console.log(queue.length); // 0

Share

HTML | BBCode | Direct Link