c# - Remove item from dictionary where value is empty list -


what best way remove item dictionary value empty list?

idictionary<int,ilist<t>>  

var foo = dictionary     .where(f => f.value.count > 0)     .todictionary(x => x.key, x => x.value); 

this create new dictionary. if want remove in-place, jon's answer trick.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -