How to convert IEnumerable of KeyValuePair<x, y> to Dictionary?
.ToDictionary(kvp=>kvp.Key,kvp=>kvp.Value);
Isn't that much more work.
You can create your own extension method that would perform as you expect.
public static class KeyValuePairEnumerableExtensions
{
public static Dictionary<TKey, TValue> ToDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source)
{
return source.ToDictionary(item => item.Key, item => item.Value);
}
}