Table of Contents

ToEnumerable Method

Definition

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

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

Returns the specified dictionary typed as KeyValuePair<TKey, TValue> sequence.

public static IEnumerable<KeyValuePair<TKey, TValue>> ToEnumerable<TKey, TValue>(this IDictionary<TKey, TValue> dictionary)

Parameters

dictionary IDictionary<TKey, TValue>

The IDictionary<TKey, TValue> to extend.

Returns

IEnumerable<KeyValuePair<TKey, TValue>>

A KeyValuePair<TKey, TValue> equivalent sequence of dictionary.

Type Parameters

TKey

The Type of the key in the resulting KeyValuePair<TKey, TValue>.

TValue

The Type of the value in the resulting KeyValuePair<TKey, TValue>.

Exceptions

ArgumentNullException

dictionary is null.