[Mono-bugs] [Bug 54019][Wis] New - FormatException in constructor Guid(string)

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 7 Feb 2004 12:35:48 -0500 (EST)


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 mono-bug@jerryweb.info.

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

--- shadow/54019	2004-02-07 12:35:48.000000000 -0500
+++ shadow/54019.tmp.21296	2004-02-07 12:35:48.000000000 -0500
@@ -0,0 +1,54 @@
+Bug#: 54019
+Product: Mono/Class Libraries
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mono-bug@jerryweb.info               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: FormatException in constructor Guid(string)
+
+FormatException in constructor Guid(string)
+
+Steps to reproduce the problem:
+Compile and execute this code:
+==============================================================
+using System;
+
+namespace Test {
+   class Test {
+      public static void Main(string[] args) {
+         Console.WriteLine(new Guid(Guid.Empty.ToString("B")));
+         Console.WriteLine(new Guid(Guid.Empty.ToString("D")));
+         Console.WriteLine(new Guid(Guid.Empty.ToString("N")));
+      }
+   }
+}
+==============================================================
+
+Actual Results:
+MS .NET Framework 1.0 (Windows XP):
+00000000-0000-0000-0000-000000000000
+00000000-0000-0000-0000-000000000000
+00000000-0000-0000-0000-000000000000
+
+Mono 0.30 (Gentoo Linux):
+00000000-0000-0000-0000-000000000000
+00000000-0000-0000-0000-000000000000
+
+Unhandled Exception: System.FormatException: Invalid format for
+Guid.Guid(string)
+in <0x00040> .GuidParser:ThrowFormatException ()
+in <0x00033> .GuidParser:ParseChar (char)
+in <0x00064> .GuidParser:ParseGuid2 ()
+in <0x0006b> .GuidParser:Parse ()
+in <0x00057> System.Guid:.ctor (string)
+in <0x00155> Test.Test:Main (string[])