is it possible to serilise a queue to xml??
i have the following code:
but it failes with: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(); }
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??
![]()




Reply With Quote