# FSharpSetCodec&lt;T&gt; Methods

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

## ConvertFromSurrogate(FSharpSetSurrogate&lt;T&gt;) {#convertfromsurrogate-ref-orleans-serialization-fsharpsetsurrogate-t-e9087ad5}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.fsharp/orleans.serialization.fsharpsetcodec-1/methods/convertfromsurrogate-ref-orleans-serialization-fsharpsetsurrogate-t-e9087ad5/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.FSharp/FSharpCodecs.cs#L976-L977)

```csharp
public override FSharpSet<T> ConvertFromSurrogate(ref FSharpSetSurrogate<T> surrogate)
```

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

### Parameters

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

### Returns

The value.

## ConvertToSurrogate(FSharpSet&lt;T&gt;, FSharpSetSurrogate&lt;T&gt;) {#converttosurrogate-microsoft-fsharp-collections-fsharpset-t-ref-orleans-serializ-08364717}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.fsharp/orleans.serialization.fsharpsetcodec-1/methods/converttosurrogate-microsoft-fsharp-collections-fsharpset-t-ref-orleans-serializ-08364717/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.FSharp/FSharpCodecs.cs#L982-L984)

```csharp
public override void ConvertToSurrogate(FSharpSet<T> value, ref FSharpSetSurrogate<T> surrogate)
```

Converts a value to the surrogate type.

### Parameters

- `value` (`FSharpSet<T>`): The value.
- `surrogate` (`FSharpSetSurrogate<T>`): The surrogate.
