[Mono-bugs] [Bug 76686][Nor] New - TypeDescriptor.GetConverter returns wrong result for nullable types

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Nov 12 14:34:32 EST 2005


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 gert.driesen at pandora.be.

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

--- shadow/76686	2005-11-12 14:34:32.000000000 -0500
+++ shadow/76686.tmp.3524	2005-11-12 14:34:32.000000000 -0500
@@ -0,0 +1,42 @@
+Bug#: 76686
+Product: Mono: Class Libraries
+Version: 1.1
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: gert.driesen at pandora.be               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: TypeDescriptor.GetConverter returns wrong result for nullable types
+
+System.ComponentModel.TypeDescriptor.GetConverter(object) returns 
+System.ComponentModel.TypeConverter instead of the actual TypeConverter 
+for an instance of a nullable type.
+
+To reproduce this issue, compile and run the following code snippet:
+
+using System;
+using System.ComponentModel;
+
+public class Test {
+  public static void Main () {
+    int? test = 1;
+    TypeConverter converter = TypeDescriptor.GetConverter(test);
+    Console.WriteLine (converter.GetType().FullName);
+  }
+}
+
+Actual result:
+
+System.ComponentModel.TypeConverter
+
+Expected result:
+
+System.ComponentModel.Int32Converter


More information about the mono-bugs mailing list