Results 1 to 6 of 6

Thread: [solved] [2005] sterilization [/solved]

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    11

    [solved] [2005] sterilization [/solved]

    BinaryFormatter sterlizer = new BinaryFormatter();
    MemoryStream picOut = new MemoryStream();
    sterlizer.Serialize(picOut, "BLABLA" );


    all that is getting put into picOut is a bunch of zeros, however the number of zeros does change depending on what i try to sterilize but it defiantly seems like there should be some ones too.

    any one know what going on here.
    Last edited by innominate09; Jun 15th, 2006 at 06:02 PM.

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: [2005] sterilization

    picOut is an empty stream what do you expect it to have?
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

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

    Re: [2005] sterilization

    Sterilize?
    I don't live here any more.

  4. #4
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: [2005] sterilization

    Quote Originally Posted by wossname
    Sterilize?
    Serialize
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  5. #5

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    11

    Re: [2005] sterilization

    yea i know i spelled it wrong for some reson unknow for me i pronouce it that way to. you know i cant have my objects going and having babbies or nothin.

    But i was expect the Serialize method to change the string into a byte array and put that byte array in the picOut Stream.

    and eventuly id like it to change an image into a byte array.

    the following code in VB2003 is working fine:

    Dim out As New MemoryStream
    sterlizer.Serialize(out, "TEST123")
    Dim bytearry As Byte()
    bytearry = out.ToArray()
    Last edited by innominate09; Jun 15th, 2006 at 06:00 PM.

  6. #6

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    11

    Re: [2005] sterilization

    well i dont know what i changed but it seems to be working now

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