[Mono-devel-list] LosFormatter needs to save array type

Matthew Mastracci matt at aclaro.com
Fri Nov 28 13:17:33 EST 2003


I've noticed a difference in LosFormatter behaviour between MS.NET and 
Mono.  In MS.NET, the array types serialized by the LosFormatter retain 
their array typing, while the Mono ones lose it.  This tends to break 
controls that assume certain strongly-typed arrays will be returned in 
the ViewState (mostly 3rd-party controls).

I have a patch that I'm playing with here, but it's not fully tested. 
All I'm doing is serializing the type of the array as the first element, 
while is then restored while building the array and passed to 
ArrayList.ToArray() to ensure that we get the array of the correct type.

I can send the patch when I'm confident I haven't broken anything.  :)

Matt.




More information about the Mono-devel-list mailing list