# TryAdd(T)

> Attempts to add a new item. Only succeeds if the item was not present.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

```csharp
public bool TryAdd(T item)
```

### Parameters

**** (T): The value to add.

### Returns

| Type                                                          | Description                                                              |
| ------------------------------------------------------------- | ------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the value was not already present (thus was successfully added). |
