Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


TryAdd(T)

Adds a new value. If the item is already present, this method returns false without replacing said item.
Read time 1 minuteLast updated 13 days ago

Definition

public bool TryAdd(T item)

Parameters

item

T
The value to add.

Returns

Type

Description

boolTrue if the value is not already present.