Hello!
Im looking for examples of how to do Serialization of a class that has dynamic arrays. Im not sure what to write in the constructor of the Serializable class and in the GetObjectData function.
Thanks
Printable View
Hello!
Im looking for examples of how to do Serialization of a class that has dynamic arrays. Im not sure what to write in the constructor of the Serializable class and in the GetObjectData function.
Thanks
you could try storing as the XML Serialization file.
Paresh
or giving sample,
something like this,
------------
string[] Str = new String[4]; // consider dynamic array
for(int i=0; i<4; i++)
{
// initialize the array
}
XmlSerializer serializer = new XmlSerializer(typeof(strPath)); // some str
FileStream stream = new FileStream("arr.txt",FileMode.Create);
serializer.Serialize(stream, lp, null);
stream.Flush();
stream.Close();
hope this helps,
Paresh