Skip to content

format

typescript
List.AddRange(objects)

class: List

description

Add a group of elements to the list.

parameter

param_nametypedescription
objectsT[]List<T>The group of elements.

reture

typedescription
void

code example

typescript
let list = new List<Number>(Number);
// Add a group of elements to the list.
list.AddRange([100, 200]);
        
for (let index = 0; index < list.count; index++) {
    Debug.Log(list.get(index));// Output the elements in the list.
}