[Mono-bugs] [Bug 49349][Nor] Changed - XmlSerializer does not complain when class lacks a default constructor

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 5 Oct 2003 13:41:42 -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 mathpup@mylinuxisp.com.

http://bugzilla.ximian.com/show_bug.cgi?id=49349

--- shadow/49349	2003-10-05 13:38:40.000000000 -0400
+++ shadow/49349.tmp.21232	2003-10-05 13:41:42.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 49349
 Product: Mono/Class Libraries
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
 Component: System.XML
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: mathpup@mylinuxisp.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -49,6 +49,35 @@
  
  
 Additional Information: 
  
 The XmlSerializer constructor needs to perform a check that the class it is pass 
 contains a public parameterless construction.
+
+------- Additional Comments From mathpup@mylinuxisp.com  2003-10-05 13:41 -------
+Test case: 
+ 
+ 
+using System; 
+using System.IO; 
+using System.Xml; 
+using System.Xml.Serialization; 
+ 
+ 
+public class MyClass 
+{ 
+    // This constructor's purpose is to inhibit the default 
+    // parameterless one 
+    public MyClass(int x) 
+    { 
+    } 
+} 
+ 
+ 
+public class Testing 
+{ 
+        static void Main() 
+        { 
+                XmlSerializer serializer = new XmlSerializer( typeof (MyClass) ); 
+        } 
+} 
+