Monday, December 30, 2013

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

Sure, you can use



serverReports.Remove(serverToRemove);

to remove an entire server from the dictionary or when looping through the servers in the dictionary, use



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

to remove an eventsource for a specific server.


- HomeGrownCoder My posts are kept as simple as possible for easier understanding. In many cases you can probably optimize or spruce up what I present. Have fun coding!


No comments:

Post a Comment