# SurrogateCodec&lt;TField, TSurrogate, TConverter&gt;.DeepCopy(TField?, CopyContext)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.serializers.surrogatecodec-3/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.serializers.surrogatecodec-3/methods/)

[Source](https://github.com/dotnet/orleans/blob/1644940b035c7bdf215a4fd7135757c06bcfe9ec/src/Orleans.Serialization/Serializers/SurrogateCodec.cs#L51-L62)

```csharp
public TField? SurrogateCodec<TField, TSurrogate, DeepCopy(TField? input, CopyContext context)
```

Creates a deep copy of the provided input.

### Parameters

- `input` (`TField?`): The input.
- `context` (`CopyContext`): The context.

### Returns

A copy of `input`, or `null` if `input` is `null`.
