文档

Unity Engine

Unity Engine

TryAdd(T)

Attempts to add a new item. Only succeeds if the item was not present.
阅读时间1 分钟最后更新于 2 个月前

Definition

public bool TryAdd(T item)

Parameters

item

T
The value to add.

Returns

Type

Description

boolTrue if the value was not already present (thus was successfully added).