Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=77159 --- shadow/77159 2006-01-05 13:56:57.000000000 -0500 +++ shadow/77159.tmp.26111 2006-01-05 14:36:36.000000000 -0500 @@ -57,6 +57,39 @@ familiar with xml serialization code). ------- Additional Comments From [EMAIL PROTECTED] 2006-01-05 13:56 ------- Created an attachment (id=16284) test case + +------- Additional Comments From [EMAIL PROTECTED] 2006-01-05 14:36 ------- +The same error happens under MS.NET (both 1.x and 2.0). + +$ ./77159.exe + +Unhandled Exception: System.InvalidOperationException: There is an +error in XML +document (5, 6). ---> System.NotSupportedException: Collection is +read-only. + at System.Collections.ReadOnlyArrayList.Add(Object obj) + at +Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read +1_X(Boolean isNullable, Boolean checkType) + at +Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read +4_X() + --- End of inner exception stack trace --- + at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader +xmlReader, St +ring encodingStyle, XmlDeserializationEvents events) + at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader +xmlReader, Xm +lDeserializationEvents events) + at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream) + at Test.Main() + + +Seeing both test code and the result above, I noticed that +XmlSerializable members should not be read-only. You should not return +read-only collections for serializable collections. + +So, I don't think it is a bug, but let's wait for Lluis. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
