By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,083 Members | 1,608 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,083 IT Pros & Developers. It's quick & easy.

Using FileStream and XmlSerializer: Gives me the error:The instruction at "0x635e0719" referenced memory at "0x00000000". The momory could not be "read

P: n/a
I am trying to serialize a collection to disk using the code provided.

This works just fine but when I try do copy and past the xml file to
another location or sometimes even just click on the file it gives me
the error: The instruction at "0x635e0719" referenced memory at
"0x00000000". The momory could not be "read.

Could anyone please help out with this
I also tried putting the code in a try catch finally and closed the
filestream.

Here is the code in the simplest form

XmlSerializer serializer = new
XmlSerializer(typeof(SSHistoryEntryList));

using(FileStream fileStream = new FileStream(file.FullName,
FileMode.Create, FileAccess.Write, FileShare.Read)) {
serializer.Serialize(fileStream, historyEntryList);
}

Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.