Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
[Serializable] public class KeyValue { public List<Dictionary<string, string>> pair { get; set; } }
当我将数据插入配置文件时,无法序列化键值对。有什么问题?
该类Dictionary不是 XML 可序列化的,但如果你用谷歌搜索它,有很多变通方法。查看此链接以获取示例。
Dictionary
如果您通过 WCF 使用它,则必须阅读以下线程
如何通过 WCF 序列化 Dictionary<string, string>?