|
-
April 21st, 2003, 07:49 AM
#1
Serialization of class with dynamic arrays
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
-
April 21st, 2003, 05:18 PM
#2
you could try storing as the XML Serialization file.
Paresh
- Software Architect
-
April 21st, 2003, 05:26 PM
#3
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
- Software Architect
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|