2

What is the best way to write an object to a file in MonoDroid so that it can be be reloaded the next time the application runs?

I'm running into problem after problem trying to use XmlSerializer, and I have been unable to get Java's ObjectOutputStream to work.

Is there any other ways to do this (short of manually writing everything out to XML) or will I have to keep trying to get XmlSerializer to work?

If there is, please provide an example. Thanks.

bertusaurus
  • 634
  • 1
  • 6
  • 12

2 Answers2

0

What is the problem that you are running into? We can't help if we don't have any information.

Have you marked the class as serializable?

Matthew
  • 4,832
  • 2
  • 29
  • 55
  • I didn't ask for help in regards to me getting XmlSerializer or Java serialization to work, I asked for other ways that objects can be written to files other than the two ways that I listed. So far all I can come up with is Json serialization. – bertusaurus Feb 06 '12 at 08:20
0

Most likely the problem is with the name/place of the file - you just don't have permissions to write there. The easiest way to check this is to write something using "regular" way.

Eugene Mayevski 'Callback
  • 45,135
  • 8
  • 71
  • 121