阅读背景:

C#XMLSerializer将错误的类型反序列化为List

来源:互联网 

The program below is a contrived example of a problem I found when deserializing XML in C#. I have two separate assemblies which declare a type with the same name, 'Country' in the example below. The types are differentiated by XML namespace. When I deserialize a configuration file containing a single 'Country' element then the correct 'Country' type is resolved. However if I deserialize a 'List' of 'Country' elements then the wrong 'Country' type is deserialized. The program below is a contrived example of a p




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: