# ExceptionCopier&lt;T, B&gt; Methods

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

## DeepCopy(T, CopyContext) {#deepcopy-t-orleans-serialization-cloning-copycontext-369785e9}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.generatedcodehelpers.orleansgeneratedcodehelper.exceptioncopier-2/methods/deepcopy-t-orleans-serialization-cloning-copycontext-369785e9/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/GeneratedCodeHelpers/OrleansGeneratedCodeHelper.cs#L308-L320)

```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`.

## DeepCopy(T, T, CopyContext) {#deepcopy-t-t-orleans-serialization-cloning-copycontext-f6afa5d6}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.generatedcodehelpers.orleansgeneratedcodehelper.exceptioncopier-2/methods/deepcopy-t-t-orleans-serialization-cloning-copycontext-f6afa5d6/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/GeneratedCodeHelpers/OrleansGeneratedCodeHelper.cs#L323)

```csharp
public virtual void ExceptionCopier<T, DeepCopy(T input, T output, CopyContext context)
```

Clones members from `input` and copies them to `output`.

### Parameters

- `input` (`T`): The input.
- `output` (`T`): The output.
- `context` (`CopyContext`): The context.
