[Mono-dev] [Patch] AssemblyName ctor

Carlos Alberto Cortez calberto.cortez at gmail.com
Fri Aug 19 05:32:03 EDT 2005


Hello

El vie, 19-08-2005 a las 11:07 +0200, Andreas Nahr escribió:
> Just looked over it briefly:
> 
> if (assemblyName == "")
> is better to be value.Length == 0 (used more than one time)

Yep, that's right. I think I need more coffee ;-)

> 
> +   assemblyName = assemblyName.Replace (" ", "");
> Is this correct? Shouldn't it be .Trim?

Well, in .Net it's possible to have something like "AssemblyName,
Version = 1.4.5.6,  CultureInfo = " etc, so, we could do additional
splits over it and do Trim () on them. Or just support the basic format
without white spaces "MyAssemblyName,Version=1.2.3.4,..."

> 
> +     if (String.Compare (parts [i], 0, "Version=", 0, 8, true, 
> CultureInfo.InvariantCulture) == 0)
> This is most likely incorrect and needs to use an ordinal comparison, no 
> InvariantCulture (used more than one time)
> 

Ben suggested somethink like this (as long I remember), but I think I
will read again the specs about those methods, and change them if
needed.

> Greets
> Andreas
> 
> ----- Original Message ----- 
> From: "Carlos Alberto Cortez" <calberto.cortez at gmail.com>
> To: "Mono Devel" <mono-devel-list at lists.ximian.com>
> Sent: Friday, August 19, 2005 10:49 AM
> Subject: [Mono-dev] [Patch] AssemblyName ctor
> 
> 
> > Hey,
> >
> > The patch attached implements the new AssemblyName ctor without using
> > internal calls. Could anybody review it?
> >
> > Carlos.
> >
> 
> 
> --------------------------------------------------------------------------------
> 
> 
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> > 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list