Así que tiene un xml que tiene una estructura similar a esto:C# deserialización parcial
<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>
¿Hay una manera que puedo deserializar MiObjeto pero no el ArrayOfOtherObject? ¿Y luego hacer una carga lenta de ArrayOfOtherObject cuando sea necesario?
Normalmente uso XmlDeserialization, pero AFAIK siempre lo carga todo.
Gracias!
Para ser sinceros, a menos que el volumen de datos es enorme que sería mejor ir para el enfoque más simple, y deserializar todo. –
+1 buena pregunta Carlo – toddmo