A few years back i needed to serialize and deserialize a dictionary. The solution turned out to be Adar Wesleys SerializeableDictionary. I can’t find the source blog post by Adar Wesley anymore but only the classes that you need to import into your project. If those files has been deleted as well i have a backup of those files here: serializabledictionary. This is an example on how to do it with C#.
Once the files are included into your project you can use this example to serialize and deserialize a dictionary: