阅读背景:

XML序列化代码在构造函数中的执行顺序——重新排序的方式?

来源:互联网 

I serialize an XML file into an object using the built-in .NET functionality (XmlSerializer.Deserialize). After the object's fields have been set, I want to act on that data by calling additional code in the object's constructor. Unfortunately, stepping through the code reveals that the "additional" code is executed first before the serialization logic is executed. That makes the approach unfeasible, since there fields haven't been initialized yet and there's no data to act on.I serialize an XML file into an object using th




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

分享到: