reflection

Updating lists from defaults using LINQ and reflection

Recently, I have found myself loading a number of XML configuration files containing lists that were subject to change as our application evolved. We needed to be able to smoothly fuse the new default items into the configuration file without losing an changes already performed on items that were still valid list members. In addition, any newly invalidated list members needed to be removed. Using LINQ's Union and Intersect methods, this is actually quite easy.

Read it!