[Mono-devel-list] string in case statement cannot > 64 chars

Namit Dhameja ndhameja at panaceasoftware.com
Mon Feb 16 14:53:35 EST 2004

Hi all,
In case statements, the maximum length of the string is 64 bytes. That is,
 strName = "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}partnerLinks";
 switch (strName)
 case "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}partnerLinks":
            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.

 -Best Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040216/b115db90/attachment.html 

More information about the Mono-devel-list mailing list