c# - Merging lists of dictionaries -


suppose have lists of dictionaries ld1 , ld2. both have dictionary objects in common. suppose dictionary object "a" in both lists. want merge list of dictionaries such same object in both lists should come once in merged list.

linq's .union should work nicely:

onelist.union(twolist) 

if need list, call tolist() on result.


Comments

Popular posts from this blog

sql server - NHibernate incorrectly creating ManyToMany table - Cannot define PRIMARY KEY constraint on nullable column error -

All overlapping substrings matching a java regex -

c++ - Using OpenSSL in a multi-threaded application -