Why did I get an error with my XmlSerializer?

前端 未结 5 853
粉色の甜心
粉色の甜心 2020-12-23 13:39

I made a couple of changes to my working application and started getting the following error at this line of code.

Dim Deserializer As New Serialization.XmlS         


        
5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-23 14:26

    The main reason this was happening was because I had a mismatch in the types I was trying to Serialize and Deserialize. I was Serializing ObservableCollection (of Group) and deserializing a business object - Groups which inherited ObservableCollection (of Group).

    And this was also part of the problem... From - http://social.msdn.microsoft.com/Forums/en-US/asmxandxml/thread/9f0c169f-c45e-4898-b2c4-f72c816d4b55/

    This exception is a part of the XmlSerializer's normal operation. It is expected and will be caught and handled inside of the Framework code. Just ignore it and continue. If it bothers you during debugging, set the Visual Studio debugger to only stop on unhandled exceptions instead of all exceptions.

提交回复
热议问题