# IRehydrationContext.TryGetBytes(string, ReadOnlySequence&lt;byte&gt;)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.irehydrationcontext/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.irehydrationcontext/methods/)

```csharp
public abstract bool TryGetBytes(string key, out ReadOnlySequence<byte> value)
```

Tries to get a sequence of bytes from the rehydration context, associated with the provided key.

### Parameters

- `key` (`string`): The key.
- `value` (`ReadOnlySequence<byte>`): The value, if present.

### Returns

`true` if the key exists in the context, otherwise `false`.
