# FrozenSetCodec&lt;T&gt; Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.frozensetcodec-1/)

## ConvertFromSurrogate(FrozenSetSurrogate&lt;T&gt;) {#convertfromsurrogate-ref-orleans-serialization-codecs-frozensetsurrogate-t-a43675a5}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.frozensetcodec-1/methods/convertfromsurrogate-ref-orleans-serialization-codecs-frozensetsurrogate-t-a43675a5/)

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

```csharp
public override FrozenSet<T> ConvertFromSurrogate(ref FrozenSetSurrogate<T> surrogate)
```

Converts a value from the surrogate type to the field type.

### Parameters

- `surrogate` (`FrozenSetSurrogate<T>`): The surrogate.

### Returns

The value.

## ConvertToSurrogate(FrozenSet&lt;T&gt;, FrozenSetSurrogate&lt;T&gt;) {#converttosurrogate-system-collections-frozen-frozenset-t-ref-orleans-serializati-41c31bff}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.frozensetcodec-1/methods/converttosurrogate-system-collections-frozen-frozenset-t-ref-orleans-serializati-41c31bff/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Codecs/FrozenSetCodec.cs#L33-L35)

```csharp
public override void ConvertToSurrogate(FrozenSet<T> value, ref FrozenSetSurrogate<T> surrogate)
```

Converts a value to the surrogate type.

### Parameters

- `value` (`FrozenSet<T>`): The value.
- `surrogate` (`FrozenSetSurrogate<T>`): The surrogate.
