Skip to content

format

typescript
List.Remove(val)

class: List

description

Removes the specified element from the list (this method only removes the first occurrence of the element).

parameter

param_nametypedescription
valTThe value of the element.

reture

typedescription
void

code example

typescript
let list = new List<Number>(Number);
list.AddRange([100, 200]);
// Remove element 100
list.Remove(100);

for (let index = 0; index < list.count; index++) {
    Debug.Log(list.get(index));
}