阅读背景:

使用XmlSerializer将空xml属性值反序列化为空int属性

来源:互联网 

I get an xml from the 3rd party and I need to deserialize it into C# object. This xml may contain attributes with value of integer type or empty value: attr=”11” or attr=””. I want to deserialize this attribute value into the property with type of nullable integer. But XmlSerializer does not support deserialization into nullable types. The following test code fails during creation of XmlSerializer with InvalidOperationException {"There was an error reflecting type 'TestConsoleApplication.SerializeMe'."}.I get an xml from the 3rd party and I need to d




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

分享到: