Hi,
I'm slowly getting there (which is always good).
Serializing my class and passing it to other classes seems to be working.
Unfortunately at the other end, things aren't as good - I'm getting a null
exception.
common data;
public void deserialize()
{
System.Xml.Serialization.XmlSerializer t = new
System.Xml.Serialization.XmlSerializer(typeof(common));
StringReader reader = new
StringReader(Intent.GetStringExtra("mydata"));
data = (common)t.Deserialize(reader);
}
This should be enough to deserialize and assign to data.
The serialize code looks like this
common data = new common();
//
XmlSerializer x = new XmlSerializer(typeof(common));
StringWriter o = new
StringWriter(System.Globalization.CultureInfo.InvariantCulture);
x.Serialize(o, data);
intent.PutExtra("mydata", o.ToString());
I'm assuming that I've used PutExtra correctly and that "mydata" is the
token I need to pull in the deserialize step.
Help!!!! I'd like to see the back of this app now ;)
Paul
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/Deserialize-from-Intent-GetStringExtra-issue-tp5032637p5032637.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid