# FixedSizeBuffer.TryGetSegment(int, ArraySegment&lt;byte&gt;)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.fixedsizebuffer/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.fixedsizebuffer/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/Common/PooledCache/FixedSizeBuffer.cs#L49-L56)

```csharp
public bool TryGetSegment(int size, out ArraySegment<byte> value)
```

Try to get a segment with a buffer of the specified size from this block. Fail if there is not enough space available

### Parameters

- `size` (`int`): The size.
- `value` (`ArraySegment<byte>`): The segment.

### Returns

`true` if the segment was retrieved; otherwise `false`.
