xml and serilisation with queues??
is it possible to serilise a queue to xml??
i have the following code:
Code:
private void SaveToDisk(Queue ErrorList)
{
Stream s = new FileStream("errors.xml", FileMode.Create);
XmlSerializer b = new XmlSerializer(typeof(Queue));
b.Serialize(s, ErrorList);
s.Close();
}
but it failes with:
An unhandled exception of type 'System.InvalidOperationException' occurred in system.xml.dll
Additional information: There was an error reflecting 'System.Collections.Queue'.
and it points to the line: XmlSerializer b = new XmlSerializer(typeof(Queue));
so can queues not be serlilised ?? I know hashtables cannot so does the same apply here??
:confused: