开发者

serialization of dictionary

开发者 https://www.devze.com 2023-02-07 22:47 出处:网络
I have lists of objects that I want to store in the session and I\'m declaring them like this: Dictionary<DateTime, List<MyObjects>> SessionMyObjects = new Dictionary<DateTime, List<

I have lists of objects that I want to store in the session and I'm declaring them like this:

Dictionary<DateTime, List<MyObjects>> SessionMyObjects = new Dictionary<DateTime, List<MyObjects>>();

I'm reading some posts that suggest that dictionaries are not serializable and storing dictionaries in the session will cause errors. What is this about? I'm using InProc; there's no serialization with this storage type? If the code compiles, could I still get some strange errors later because o开发者_Python百科f using this structure?


Why isnt there an XMLSerializable dictionary in .NET?


Paul Welter published a good SerializableDictionary.

0

精彩评论

暂无评论...
验证码 换一张
取 消