Table of Contents

CopyTo Method

Definition

Namespace
Cuemon.Extensions.Collections.Generic
Assemblies
Cuemon.Extensions.Collections.Generic.dll
Source
src/Cuemon.Extensions.Collections.Generic/DictionaryExtensions.cs

CopyTo<TKey, TValue>(IDictionary<TKey, TValue>, IDictionary<TKey, TValue>)

Copies all elements from source to destination.

public static IDictionary<TKey, TValue> CopyTo<TKey, TValue>(this IDictionary<TKey, TValue> source, IDictionary<TKey, TValue> destination)

Parameters

source IDictionary<TKey, TValue>

The IDictionary<TKey, TValue> to extend.

destination IDictionary<TKey, TValue>

The IDictionary<TKey, TValue> to which the elements of the source will be copied.

Returns

IDictionary<TKey, TValue>

An IDictionary<TKey, TValue> that is the result of the populated destination.

Type Parameters

TKey

The type of the keys in the dictionary.

TValue

The type of the values in the dictionary.

CopyTo<TKey, TValue>(IDictionary<TKey, TValue>, IDictionary<TKey, TValue>, Action<IDictionary<TKey, TValue>, IDictionary<TKey, TValue>>)

Copies elements from source to destination using the copier delegate.

public static IDictionary<TKey, TValue> CopyTo<TKey, TValue>(this IDictionary<TKey, TValue> source, IDictionary<TKey, TValue> destination, Action<IDictionary<TKey, TValue>, IDictionary<TKey, TValue>> copier)

Parameters

source IDictionary<TKey, TValue>

The IDictionary<TKey, TValue> to extend.

destination IDictionary<TKey, TValue>

The IDictionary<TKey, TValue> to which the elements of the source will be copied.

copier Action<IDictionary<TKey, TValue>, IDictionary<TKey, TValue>>

The delegate that will populate a copy of source to the specified destination.

Returns

IDictionary<TKey, TValue>

An IDictionary<TKey, TValue> that is the result of the populated destination.

Type Parameters

TKey

The type of the keys in the dictionary.

TValue

The type of the values in the dictionary.