D
Daniel
Hi,
Lets say I have the following XML:
<Person>
<Name/>
<Age/>
</Person>
Now, in addition to name and age, the class that loads this xml has a
public data member named Children of type ChildrenCollection which
implements ICollection.
The problem is that XmlSerializer notice that the Children data member
implements the collection interface and creates an empty collection
even if the children section does not exists in the incoming xml. I
would rather have a null pointer in this case for several reasons.
Is there a way to tell the XmlSerializer not to create the empty
collection?
Thanks,
Daniel
Lets say I have the following XML:
<Person>
<Name/>
<Age/>
</Person>
Now, in addition to name and age, the class that loads this xml has a
public data member named Children of type ChildrenCollection which
implements ICollection.
The problem is that XmlSerializer notice that the Children data member
implements the collection interface and creates an empty collection
even if the children section does not exists in the incoming xml. I
would rather have a null pointer in this case for several reasons.
Is there a way to tell the XmlSerializer not to create the empty
collection?
Thanks,
Daniel