Results 1 to 4 of 4

Thread: serialize ALL objects?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    serialize ALL objects?

    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?

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  2. #2
    Fanatic Member Mr.No's Avatar
    Join Date
    Sep 2002
    Location
    Mauritius
    Posts
    651

    Re: serialize ALL objects?

    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#
    Using VB.NET 2003/.NET 1.1/C# 2.0
    http://del.icio.us/rajoo
    Blow your mind, smoke gunpowder
    Ashes to ashes, dust to dust
    If God won't have you, the devil will. - Author unknown
    Don't follow me, I'm lost too ...

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: serialize ALL objects?

    lol ill give this a shot

    thanks

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  4. #4
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: serialize ALL objects?

    Just serialise the array, the array will deal with everything. I assume you are using Binary serialization and not XML.
    I don't live here any more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width