score:221

Accepted answer

todictionary is the way to go. it does work - you were just using it incorrectly, presumably. try this:

dic = dic.where(p => p.key == 1)
         .todictionary(p => p.key, p => p.value);

having said that, i assume you really want a different where filter, as your current one will only ever find one key...


Related Query

More Query from same tag