[Mono-bugs] [Bug 54473][Wis] New - string in case statement cannot > 64 chars

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 17 Feb 2004 13:40:22 -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 ndhameja@panaceasoftware.com.


--- shadow/54473	2004-02-17 13:40:22.000000000 -0500
+++ shadow/54473.tmp.14740	2004-02-17 13:40:22.000000000 -0500
@@ -0,0 +1,40 @@
+Bug#: 54473
+Product: Mono/Compilers
+Version: unspecified
+OS: SUSE 9.0
+OS Details: 
+Status: NEW   
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ndhameja@panaceasoftware.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: string in case statement cannot > 64 chars
+In case statements, the maximum length of the string is 64 bytes. That is,
+ strName = "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}
+ switch (strName)
+ {
+ case "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}
+            System.Console.WriteLine ("Found it"); break;
+ default:  System.Console.WriteLine ("Not Found it"); break;
+ }
+This code will print "Not Found it".
+On .Net the above code works just fine. I am not aware of the maximum 
+string length possible under .Net. If 64 characters is indeed the 
+specification and not a bug than perhaps the compiler should issue some 
+sort of warning about it.
+ Maybe it would be a better idea to make the string length the same as 
+microsoft .Net.