# PooledBuffer.Slice(int, int)

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

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

```csharp
public readonly BufferSlice Slice(int offset, int length)
```

Returns a slice of this buffer, beginning at the specified offset and having the specified length.

### Parameters

- `offset` (`int`)
- `length` (`int`)

### Returns

A slice representing a subset of this instance, beginning at the specified offset.
