c# - Dictionary to anonymous object -


i have dictionary collection, string, int. want convert dictionary anonymous object properties collection keys , anonymous object propertie's values dictionary values. way it?

thank you

are looking this?

var keyvals = dict.select(kv => new { key = kv.key, value = kv.value }); 

but can't imagine use case this. why prefer anonymous type on available dictionary?


Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -