[Mono-devel-list] Bug fix for Microsoft.VisualBasic.CompilerServices...

Christopher D. Hawkinson chawkinson at lantronix.com
Mon Apr 12 17:07:21 EDT 2004


Hi Rafael,

Here's another one for you too.  This fixes the VB Len() function so a null string can be passed without an exception. In MS VB, this returns just 0 length, so I did the same here.

Here's the code for the Len() function found in Strings.c (Microsoft.VisualBasic library).

		public static int Len(string Expression) 
		{
			if ((object)Expression == null) {
				// Null strings have a length of 0
				return 0;
			} else {
				return Expression.Length; //length of the string
			}
		}

Thanks for checking these in.

Bye,
Chris

-----Original Message-----
From: A Rafael D Teixeira [mailto:rafaelteixeirabr at hotmail.com] 
Sent: Monday, April 12, 2004 12:11 PM
To: Christopher D. Hawkinson; mono-devel-list at lists.ximian.com
Subject: RE: [Mono-devel-list] Bug fix for Microsoft.VisualBasic.CompilerServices...


Thanks for your patch, Christopher, I'll merge and commit it when I get back 
to my Linux Box at night. Currently I'm at my contractor's office, behind a stricken firewall.

Best regards,


Rafael "Monoman" Teixeira
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/ MonoBrasil Founding Member - Membro Fundador do MonoBrasil 
http://monobrasil.softwarelivre.org
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

_________________________________________________________________
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br



**********************************************************************
This e-mail is the property of Lantronix. It is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential, or otherwise protected from disclosure. Distribution or copying of this e-mail, or the information contained herein, to anyone other than the intended recipient is prohibited.




More information about the Mono-devel-list mailing list