G
Guest
Hi
I tried to serialize an object in CF.NEt using OpenNETCF.org's XmlSerializer
The follwoing is the contruct of my objec
-------------Start Complex object---------
public class Perso
public int Age
public string Description
public double Height
public Person(
Age =20
Description = "Good Looking"
Height = 11.5
-------------End Complex object---------
and the following is the piece of code I used for serializatio
-------------Start Serialization ---------
Person person = new Person()
OpenNETCF.Xml.Serialization.XmlSerializer serializer = new OpenNETCF.Xml.Serialization.XmlSerializer(typeof(Person))
using (FileStream stream = new FileStream("person.txt",FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite)
serializer.Serialize(stream,person )
-------------End Serialization ---------
The following is the file that is generated. If you see that the object is no serialized with its public members. Can anybody tell why? or where am I going wrong
<?xml version="1.0" encoding="us-ascii" ?><Person />
I tried to serialize an object in CF.NEt using OpenNETCF.org's XmlSerializer
The follwoing is the contruct of my objec
-------------Start Complex object---------
public class Perso
public int Age
public string Description
public double Height
public Person(
Age =20
Description = "Good Looking"
Height = 11.5
-------------End Complex object---------
and the following is the piece of code I used for serializatio
-------------Start Serialization ---------
Person person = new Person()
OpenNETCF.Xml.Serialization.XmlSerializer serializer = new OpenNETCF.Xml.Serialization.XmlSerializer(typeof(Person))
using (FileStream stream = new FileStream("person.txt",FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite)
serializer.Serialize(stream,person )
-------------End Serialization ---------
The following is the file that is generated. If you see that the object is no serialized with its public members. Can anybody tell why? or where am I going wrong
<?xml version="1.0" encoding="us-ascii" ?><Person />