तो मेरे पास है एक xml यह करने के लिए इसी तरह की एक संरचना है कि:सी # आंशिक अक्रमांकन
<MyObject>
<PropertyA>Value</PropertyA>
<PropertyB>Value</PropertyB>
<PropertyC>Value</PropertyC>
<ArrayOfOtherObject>
<OtherObject>
<PropertyX>Value</PropertyX>
<PropertyY>Value</PropertyY>
<PropertyZ>Value</PropertyZ>
</OtherObject>
<OtherObject>
<PropertyX>Value</PropertyX>
<PropertyY>Value</PropertyY>
<PropertyZ>Value</PropertyZ>
</OtherObject>
<OtherObject>
<PropertyX>Value</PropertyX>
<PropertyY>Value</PropertyY>
<PropertyZ>Value</PropertyZ>
</OtherObject>
</ArrayOfOtherObject>
</MyObject>
वहाँ एक रास्ता है कि मैं MyObject deserialize सकते हैं, लेकिन नहीं ArrayOfOtherObject है? और फिर बाद में जब आवश्यक हो तो ArrayOfOtherObject का आलसी लोड करें?
मैं आमतौर पर XmlDeserialization का उपयोग करता हूं, लेकिन AFAIK यह हमेशा पूरी चीज लोड करता है।
धन्यवाद!
ईमानदारी से कहूं तो, जब तक कि डेटा की मात्रा बहुत बड़ा है आप बंद बेहतर होगा सरल दृष्टिकोण के लिए जा रहा है, और deserialize यह सब। –
+1 अच्छा सवाल कार्लो – toddmo