1
我在我的C#應用程序中使用AppFabric緩存。我試圖緩存一個XmlDocument,但得到以下錯誤:'System.Xml.XmlDocument'無法序列化
Type 'System.Xml.XmlDocument' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute.
如何解決此問題?
爲什麼不直接將XML存儲爲字符串,而是將其存儲爲序列化的XmlDocument類? – mdm
[C#:wcf返回一個XmlDocument?]的可能重複(http://stackoverflow.com/questions/964870/c-wcf-return-an-xmldocument) –