|
-
Jun 14th, 2006, 10:44 PM
#1
Thread Starter
New Member
[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.
-
Jun 15th, 2006, 04:35 AM
#2
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
-
Jun 15th, 2006, 06:18 AM
#3
I don't live here any more.
-
Jun 15th, 2006, 07:41 AM
#4
Re: [2005] sterilization
 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
-
Jun 15th, 2006, 05:56 PM
#5
Thread Starter
New Member
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.
-
Jun 15th, 2006, 06:01 PM
#6
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|