# TryDequeue(out T)

> Removes the element from the end of the queue.

## Definition

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

## TryDequeue(T)

```csharp
public bool TryDequeue(out T item)
```

### Parameters

**** (T): Outputs the element removed.

### Returns

| Type                                                          | Description                     |
| ------------------------------------------------------------- | ------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if an element was removed. |

### Remarks

Does nothing if the queue is empty.
