tag:blogger.com,1999:blog-27571866.post1823993246710915985..comments2023-10-19T18:40:24.685+03:00Comments on Coder`s Daily News: Serializable dictionary in C#Vladhttp://www.blogger.com/profile/12438770862852429709noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-27571866.post-90908288095193588982012-04-05T23:21:27.603+03:002012-04-05T23:21:27.603+03:00I've been able to work around this problem. It...I've been able to work around this problem. It may not work for all use cases, but will work for most. Instead of using the XmlSerializer (which begins to age in comparison of other .Net serializers), I used XamlServices, here's a bit of code:<br /><br />var values = new Dictionary();<br /> values.Add("MY KEY", "MY VALUE");<br /> var builder = new StringBuilder();<br /> XamlServices.Save(new StringWriter(builder), values);<br /> var data = builder.ToString();<br /> MessageBox.Show(data);<br /><br /> var result = (IDictionary)XamlServices.Load(new StringReader(data));<br /> MessageBox.Show(result.ToString());<br /><br />And that worked for me.Jocelyn Hottehttps://www.blogger.com/profile/15695919405187298006noreply@blogger.comtag:blogger.com,1999:blog-27571866.post-84454370056418053622011-03-30T08:49:57.956+03:002011-03-30T08:49:57.956+03:00You can find another implementation under followin...You can find another implementation under following link: <a href="http://www.jankowskimichal.pl/en/2010/10/serializabledictionary/" rel="nofollow">Serializable dictionary</a>Janosznoreply@blogger.comtag:blogger.com,1999:blog-27571866.post-76676140979268234572009-05-14T07:51:00.000+03:002009-05-14T07:51:00.000+03:00"it's not serializable" that's all I needed. Thank..."it's not serializable" that's all I needed. Thanks for the quick info :)Anonymousnoreply@blogger.com