https://bugzilla.novell.com/show_bug.cgi?id=635782

https://bugzilla.novell.com/show_bug.cgi?id=635782#c1


Mika Aalto <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Mika Aalto <[email protected]> 2010-10-03 12:19:27 UTC ---
Given example fails also with MS .NET but exception type and error message are
different. MS .NET throws SerializationException with message "End of Stream
encountered before parsing was completed.".

You can get your code working if you reset memory stream position before
deserializing like this:

Stream s = new MemoryStream();
int[] arr = new int[] { 1, 2, 3 };
IFormatter formatter = new BinaryFormatter();
formatter.Serialize(s, arr);
s.Position = 0;
arr = formatter.Deserialize(s) as int[];
s.Close();
foreach (var item in arr)
    Console.WriteLine(item);

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to