PDA

Click to See Complete Forum and Search --> : serialize ALL objects?


Techno
Mar 12th, 2006, 02:16 PM
This may sound daft for which I am sorry.

I have an array

I have objects (x amount) stored in the array, all of the same type.

I want to serialize all the objects in the array. How can I do this in one go without doing a serialize on each object in the array? is this possible?

Mr.No
Mar 13th, 2006, 01:51 PM
I'd say put the array in a class and declare the class as serializable. If the array contains your own defined class objects this class object should also be declared as serializable.

ps: Don't ask me for a sample, I'm still a VB.NET developer attemptng to learn C# :blush:

Techno
Mar 13th, 2006, 04:25 PM
lol ill give this a shot

thanks

wossname
Mar 22nd, 2006, 01:39 PM
Just serialise the array, the array will deal with everything. I assume you are using Binary serialization and not XML.