# ImmutableQueueCodec&lt;T&gt;.ConvertToSurrogate(ImmutableQueue&lt;T&gt;, ImmutableQueueSurrogate&lt;T&gt;)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.immutablequeuecodec-1/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.immutablequeuecodec-1/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Codecs/ImmutableQueueCodec.cs#L29)

```csharp
public override void ConvertToSurrogate(ImmutableQueue<T> value, ref ImmutableQueueSurrogate<T> surrogate)
```

Converts a value to the surrogate type.

### Parameters

- `value` (`ImmutableQueue<T>`): The value.
- `surrogate` (`ImmutableQueueSurrogate<T>`): The surrogate.
