You may want to ignore culture and case in your comparison:

return reference.Name.Equals(definition.Name,
StringComparison.InvariantCultureIgnoreCase)



On Wed, Aug 28, 2013 at 1:29 AM, mlgo <mlint...@sinenomine.net> wrote:

> According to
>
> http://msdn.microsoft.com/en-us/library/system.reflection.assemblyname.referencematchesdefinition.aspx
>
> The following is what is expected to be returned from
> ReferenceMatchesDefinition.
>
> Returns a value indicating whether two assembly names are the same. The
> comparison is based on the simple assembly names.
>
> This seems naïve but below is a tentative implementation of that. Any
> ideas?
>
> public static bool ReferenceMatchesDefinition (AssemblyName reference,
> AssemblyName definition)
>                 {
>                         if (reference == null)
>                                 throw new ArgumentNullException
> ("reference");
>                         if (definition == null)
>                                 throw new ArgumentNullException
> ("definition");
>                         if (reference.Name != definition.Name)
>                                 return false;
>
>                         return reference.Name.Equals(definition.Name);
>                 }
>
>
>
>
> --
> View this message in context:
> http://mono.1490590.n4.nabble.com/A-possible-implementation-for-AssemblyName-ReferenceMatchesDefinition-tp4660683.html
> Sent from the Mono - Dev mailing list archive at Nabble.com.
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to