[Mono-bugs] [Bug 48351][Nor] New - TypeDescriptor.GetTypeConverter fails for enums + EnumConverter does not work
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 10 Sep 2003 11:02:22 -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 joergr@voelcker.com.
http://bugzilla.ximian.com/show_bug.cgi?id=48351
--- shadow/48351 2003-09-10 11:02:22.000000000 -0400
+++ shadow/48351.tmp.732 2003-09-10 11:02:22.000000000 -0400
@@ -0,0 +1,43 @@
+Bug#: 48351
+Product: Mono/Class Libraries
+Version: unspecified
+OS: Debian Woody
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: JoergR@voelcker.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: TypeDescriptor.GetTypeConverter fails for enums + EnumConverter does not work
+
+Description of Problem:
+If you call TypeDescriptor.GetTypeConverter with an enum type it returns
+null. That's because EnumConverter doesn't have a default constructor.
+
+EnumConverter fails with an InvalidCastException when calling
+ConvertFromInvariantString when ConvertFrom tries to cast enum values to long.
+
+Steps to reproduce the problem:
+1. Compile attached sample
+2. Run it
+
+Actual Results:
+No converter found.
+
+Expected Results:
+Converter Type: System.ComponentModel.EnumConverter
+Test -> Test
+Mono -> Mono
+Hello, Mono -> Hello, Mono
+
+
+How often does this happen?
+Always.
+
+Additional Information: