How to XML deserialize an object of Unknown Type?

前端 未结 5 1449
终归单人心
终归单人心 2020-12-21 11:54

I want to save my object to hard disk (like cache) with XmlSerializer. In this case, I don\'t have any problem.

However, when I want to deserialize thi

5条回答
  •  青春惊慌失措
    2020-12-21 12:01

    There is no way in .Net to deserialize to unknown object.

    To successfully serialize/deserialize an XML object the class must have default constructor. The best way is to show us the exact error message. Can you do that?

提交回复
热议问题