Quantcast
Channel: How to? XML Serialization of a Class Object - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by Richard Schneider for How to? XML Serialization of a Class Object

$
0
0

The XML serialiser requires that public properties are gettable and settable. TotalHops and TaskHops do meet this criteria.

Try something like:

public class Flow{    public int CurrentHop { get; set; }    public int TotalHops { get; set; }    [XmlArrayItem(ElementName = "Hop", IsNullable = false)]    public List<tblTaskHop> TaskHops { get; set; }}

Also note that the Type tblTaskHop must follow the same rule.

Also, @Yuck has a better serialiser function.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles



Latest Images