Howto serialize a List<T> in Silverlight?
Posted
by Jurgen
on Stack Overflow
See other posts from Stack Overflow
or by Jurgen
Published on 2010-04-20T23:02:34Z
Indexed on
2010/04/20
23:23 UTC
Read the original article
Hit count: 463
I have a struct called coordinate which is contained in a list in another class called segment.
public struct Coordinate
{
public double Latitude { get; set; }
public double Longtitude { get; set; }
public double Altitude { get; set; }
public DateTime Time { get; set; }
}
public class Segment
{
private List<Coordinate> coordinates;
...
}
I'd like to serialize the Segment class using the XmlSerializer using Silverlight (on Windows Phone 7). I understand from link text that XmlSerializer doesn't support List<T>
. What is the advised way of serializing a resizable array coordinates?
Thanks, Jurgen
© Stack Overflow or respective owner