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

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

## DeepCopy(SortedDictionary&lt;TKey, TValue&gt;, CopyContext) {#deepcopy-system-collections-generic-sorteddictionary-tkey-tvalue-orleans-seriali-f6ae2164}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.sorteddictionarycopier-2/methods/deepcopy-system-collections-generic-sorteddictionary-tkey-tvalue-orleans-seriali-f6ae2164/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Codecs/SortedDictionaryCodec.cs#L94-L111)

```csharp
public SortedDictionary<TKey, TValue> SortedDictionaryCopier<TKey, DeepCopy(SortedDictionary<TKey, TValue> input, CopyContext context)
```

Creates a deep copy of the provided input.

### Parameters

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

### Returns

A copy of `input`.

## DeepCopy(SortedDictionary&lt;TKey, TValue&gt;, SortedDictionary&lt;TKey, TValue&gt;, CopyContext) {#deepcopy-system-collections-generic-sorteddictionary-tkey-tvalue-system-collecti-0e5512fd}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.sorteddictionarycopier-2/methods/deepcopy-system-collections-generic-sorteddictionary-tkey-tvalue-system-collecti-0e5512fd/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Codecs/SortedDictionaryCodec.cs#L117-L121)

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

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

### Parameters

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