How to XML serialize and deserialize an instance o

2019-09-06 07:02发布

I want to serialize and deserialize my dictionary object of type Dictionary <type, List<Action<T>>>. I tried using XMLserializer - it fails.

Cannot serialize member MyClass.MyDictionary of type System.Collections.Generic.Dictionary‘2[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], because it implements IDictionary.

I am using .NET framework 4.0. What is the right way to do this?

0条回答
登录 后发表回答