# Try(ref Block)

> Tries to allocate the block with this allocator.

## Definition

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

## Try(Block)

```csharp
public int Try(ref AllocatorManager.Block block)
```

### Parameters

**** (\[Block]\(/engine/6000.7/script-reference/unity/collections/allocatormanager/block)): The block to allocate.

### Returns

| Type                                                       | Description                                        |
| ---------------------------------------------------------- | -------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | 0 if successful. Otherwise, returns an error code. |
