Results 1 to 3 of 3

Thread: Newbie Q about serialization

  1. #1

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

    Newbie Q about serialization

    MSDN has a simple example of how to Binary serialize an instance of a class, and I have that working fine.

    Now I need to work out how to write several instances to the same file when the instances are not in an array, they are all individually declared.

    Also, how to you serialize / deserialize an array of instances?

    In .Net I've been working solely with text files up to now and I realised I have no idea how to do binary files!
    I don't live here any more.

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    I believe an Array is serializable by default as long as all of the items into are as well. I know an ArrayList is. Serialization isn't intended for individual items to be in the same stream (output), you'd need to write our own handler for that or just put all the items in an array and then serialize the array.

  3. #3

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    Cheers.
    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