[Mono-bugs] [Bug 81958][Nor] New - System.Guid(string) constructors fails with non-trimmed strings

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Jun 27 18:06:37 EDT 2007

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 francesco.malandrino at tiscali.it.


--- shadow/81958	2007-06-27 18:06:36.000000000 -0400
+++ shadow/81958.tmp.2258	2007-06-27 18:06:36.000000000 -0400
@@ -0,0 +1,39 @@
+Bug#: 81958
+Product: Mono: Runtime
+Version: 1.2
+OS: All
+OS Details: tested on various Linux versions
+Status: NEW   
+Severity: 001 One hour
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: francesco.malandrino at tiscali.it               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: System.Guid(string) constructors fails with non-trimmed strings
+Description of Problem:
+The constructor System.Guid(string) of type System.Guid fails with
+"System.FormatException: Invalid format for Guid.Guid(string)"
+when the passed string is not trimmed, i.e. contains some spaces after the
+actual guid - e.g. "a42a7a29-8c0f-4f9d-bd7b-0fad54802510      "
+Steps to reproduce the problem:
+1. write: 'Guid x = new Guid("a42a7a29-8c0f-4f9d-bd7b-0fad54802510      ");'
+2. execute ;)
+Actual Results:
+System.FormatException: Invalid format for Guid.Guid(string)
+Expected Results:
+The Guid is created, trimming the passed string. This is how MS .NET
+behaves, and some tools (I was trying a MembershipProvider) expect.
+How often does this happen? 
+Additional Information:

More information about the mono-bugs mailing list