mixed XML serialization

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • andrewcw

    mixed XML serialization

    I have an object that serializes back and forth.
    I would like to have some objects not serialize ..and when
    I read that info back into the class, have this item be
    null ( or something like it ).

    I modified a class I made by XSD.exe by adding these
    values ( drvltr, disknum) , but I found when I wrote the
    class out to file and retrieved it, the values were
    persisted.

    If this is reasonable, how do I approach it ? Thanks

    In the example below, the tool inserts the declaration
    [System.Xml.Seri alization.XmlAt tributeAttribut e()]
    for each attribute. Therefore I added the the attributes
    drvltr and disknum because I reasoned maybe without the
    declaration, they would be ignored.

    [System.Xml.Seri alization.XmlAt tributeAttribut e()]
    public string uniqueid;
    public string drvltr;
    public string disknum;

Working...