format
typescript
Stack.countclass: Stack
description
The number of elements in the stack.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
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);