# AsSpan()

> Exposes NativeArray<T> data as a System.Span<T>.

## Definition

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

```csharp
public readonly Span<T> AsSpan()
```

### Returns

| Type                                                             | Description                    |
| ---------------------------------------------------------------- | ------------------------------ |
| [Span\<T>](https://learn.microsoft.com/dotnet/api/system.span-1) | A read-write `System.Span<T>`. |
