Linq: The Missing ToDictionary Extension Method Overload - Om...
Popularity Report
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
URL Tag Cloud
Bookmark History
Saved by 1 people (0 private), first by anonymouse user on 2008-05-20
- Bluecockatoo on 2008-05-20 - Tags generics , C# , .Net , codesnippets
Public Sticky notes
public static Dictionary<TKey, TValue> ToDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> enumeration)
{
// Check to see that enumeration is not null
if (enumeration == null)
throw new ArgumentNullException("enumeration");
return enumeration.ToDictionary(item => item.Key, item => item.Value);
}
Highlighted by bluecockatoo


Public Comment