length Summary Returns the number of elements in the queue. Usage public property int length() Returns The number of elements in the queue. Description Returns the size of the queue, equivalent to the number of elements in the queue. Examples Basic Usage 1234567import System; auto queue1 = new Queue<int>();auto queue2 = new Queue<int>([ 1, 2, 3 ]); Console.log(queue1.length); // 0Console.log(queue2.length); // 3 Share HTML | BBCode | Direct Link