# ExceptionCopier&lt;T, B&gt;.DeepCopy(T?, CopyContext)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.generatedcodehelpers.orleansgeneratedcodehelper.exceptioncopier-2/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.generatedcodehelpers.orleansgeneratedcodehelper.exceptioncopier-2/methods/)

[Source](https://github.com/dotnet/orleans/blob/1644940b035c7bdf215a4fd7135757c06bcfe9ec/src/Orleans.Serialization/GeneratedCodeHelpers/OrleansGeneratedCodeHelper.cs#L345-L357)

```csharp
public T? ExceptionCopier<T, DeepCopy(T? original, CopyContext context)
```

Creates a deep copy of the provided input.

### Parameters

- `original` (`T?`): The input.
- `context` (`CopyContext`): The context.

### Returns

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