# AsRef<T>(in T)

> Returns a read-write reference from a read-only reference. Useful when you want to pass an in arg (read-only reference) where a ref arg (read-write reference) is expected. Do not mutate the referenced value, as doing so may break the runtime's assumptions.

## Definition

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

## AsRef\<T>(T)

```csharp
public static ref T AsRef<T>(in T value) where T : unmanaged
```

### Parameters

**** (T): A read-only reference.

### Returns

| Type | Description                                               |
| ---- | --------------------------------------------------------- |
| T    | A read-write reference to the value referenced by `item`. |
