Monday, December 30, 2013

Compare two dictionary objects and add missing items from dict-2 to dict-1

Hello HGC,



Sorry to bother you again, I have two filled dictionaries with me, one with ServerReport and other with EventConfig.



I need to remove the key or values when user deleted something in EventConfig dictionary. I knew that we can remove keys or values using below.



serverReports.Remove(serverToRemove);

serverReports[item.Key].Remove(eventSourceToRemove);



But, please advise on conditions like your foreach loop in MergeDictionaries() above.




No comments:

Post a Comment