# DictionaryCopier&lt;TKey, TValue&gt; Methods

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

## DeepCopy(Dictionary&lt;TKey, TValue&gt;, CopyContext) {#deepcopy-system-collections-generic-dictionary-tkey-tvalue-orleans-serialization-544111ff}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.dictionarycopier-2/methods/deepcopy-system-collections-generic-dictionary-tkey-tvalue-orleans-serialization-544111ff/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Codecs/DictionaryCodec.cs#L179-L196)

```csharp
public Dictionary<TKey, TValue> DictionaryCopier<TKey, DeepCopy(Dictionary<TKey, TValue> input, CopyContext context)
```

Creates a deep copy of the provided input.

### Parameters

- `input` (`Dictionary<TKey, TValue>`): The input.
- `context` (`CopyContext`): The context.

### Returns

A copy of `input`.

## DeepCopy(Dictionary&lt;TKey, TValue&gt;, Dictionary&lt;TKey, TValue&gt;, CopyContext) {#deepcopy-system-collections-generic-dictionary-tkey-tvalue-system-collections-ge-48994e7a}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.dictionarycopier-2/methods/deepcopy-system-collections-generic-dictionary-tkey-tvalue-system-collections-ge-48994e7a/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Codecs/DictionaryCodec.cs#L202-L216)

```csharp
public void DictionaryCopier<TKey, DeepCopy(Dictionary<TKey, TValue> input, Dictionary<TKey, TValue> output, CopyContext context)
```

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

### Parameters

- `input` (`Dictionary<TKey, TValue>`): The input.
- `output` (`Dictionary<TKey, TValue>`): The output.
- `context` (`CopyContext`): The context.
