[Mono-bugs] [Bug 49469][Nor] New - Xml Serialization doesnt handle structs

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 8 Oct 2003 19:32:21 -0400 (EDT)

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 bmaurer@users.sf.net.


--- shadow/49469	2003-10-08 19:32:21.000000000 -0400
+++ shadow/49469.tmp.28130	2003-10-08 19:32:21.000000000 -0400
@@ -0,0 +1,61 @@
+Bug#: 49469
+Product: Mono/Class Libraries
+Version: unspecified
+OS Details: 
+Status: NEW   
+Severity: Unknown
+Priority: Normal
+Component: System.XML
+AssignedTo: lluis@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: Xml Serialization doesnt handle structs
+Description of Problem:
+Xml Serialization cant handle serializing structs, it claims they have no
+default constructor (which is incorrect)
+Steps to reproduce the problem:
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+struct T {
+	int i;
+	static void Main ()
+	{
+		XmlSerializer s = new XmlSerializer (typeof (T));
+	}
+Actual Results:
+Unhandled Exception: System.InvalidOperationException: T cannot be
+serialized because it does not have a default public constructor
+in [0x00058] (at
+in [0x0008c] (at
+in [0x0004e] (at
+in [0x00006] (at
+System.Xml.Serialization.XmlSerializer:.ctor (System.Type)
+in <0x0002d> .T:Main ()
+Expected Results:
+It runs
+How often does this happen?