J
Joe Audette
Is it possible to(XML) serialize an ArrayList of simple
objects in a desktop app, then store the serialized files
as an embedded resource and then de-serialize them on the
device?
The ArrayList would contain objects for this class:
public class Word
{
public Word()
{}
public string PhraseText = "";
public string FontType = "Normal";
public bool IsLink = false;
public bool IsImage = false;
public string ImageToShow;
public string URL;
public Region ClickRegion;
public int Width = 0;
public int Height = 0;
}
I'm trying to use this code to serialize on the desktop
but I'm getting errors:
XmlSerializer mySerializer = new XmlSerializer(typeof
(ArrayList));
StreamWriter streamWriter = new StreamWriter("C:\\" +
name + ".xml");
mySerializer.Serialize(streamWriter, words);
streamWriter.Close();
Thanks for any advice on this.
objects in a desktop app, then store the serialized files
as an embedded resource and then de-serialize them on the
device?
The ArrayList would contain objects for this class:
public class Word
{
public Word()
{}
public string PhraseText = "";
public string FontType = "Normal";
public bool IsLink = false;
public bool IsImage = false;
public string ImageToShow;
public string URL;
public Region ClickRegion;
public int Width = 0;
public int Height = 0;
}
I'm trying to use this code to serialize on the desktop
but I'm getting errors:
XmlSerializer mySerializer = new XmlSerializer(typeof
(ArrayList));
StreamWriter streamWriter = new StreamWriter("C:\\" +
name + ".xml");
mySerializer.Serialize(streamWriter, words);
streamWriter.Close();
Thanks for any advice on this.