# CachedMessageBlock.GetIndexOfFirstMessageLessThanOrEqualTo(StreamSequenceToken)

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

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/Common/PooledCache/CachedMessageBlock.cs#L173-L180)

```csharp
public int GetIndexOfFirstMessageLessThanOrEqualTo(StreamSequenceToken token)
```

Gets the index of the first message in this block that has a sequence token at or before the provided token

### Parameters

- `token` (`StreamSequenceToken`): The sequence token.

### Returns

The index of the first message in this block that has a sequence token equal to or before the provided token.
