# ArcBufferPage.AsArraySegment(int, int)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.buffers.arcbufferpage/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.buffers.arcbufferpage/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Buffers/ArcBufferWriter.cs#L937)

```csharp
public ArraySegment<byte> AsArraySegment(int offset, int length)
```

Returns an array segment pointing to the underlying array, starting from the provided offset, and having the provided length.

### Parameters

- `offset` (`int`): The offset into the array that the array segment starts from.
- `length` (`int`): The length of the array segment.

### Returns

The array segment.
