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 123456import System; auto queue = new Queue<int>([ 1, 2, 3 ]);Console.log(queue.length); // 3queue.clear();Console.log(queue.length); // 0 Share HTML | BBCode | Direct Link