Skip to content

format

typescript
Stack.count

class: Stack

description

The number of elements in the stack.

parameter

param_nametypedescription

reture

typedescription
number

code example

typescript
let stack = new Stack<Number>();
stack.Push(1);
stack.Push(2);
stack.Push(3);

let count = stack.count;
Debug.Log("Number of elements: ", count);