Skip to content

格式

typescript
List.Remove(val)

所属类: List

描述

删除列表中的指定元素(该方法只移除第一个检索到的元素)。

参数

参数名类型描述
valT元素值

返回值

类型描述
void

代码示例

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

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