[Mono-dev] Bug in corlib/System.Reflection (r139375)

Andreas Nahr ClassDevelopment at A-SoftTech.com
Mon Aug 17 15:14:12 EDT 2009


The following addition in r139375 is buggy.

 

if (type.ToString ().EndsWith ("[*]")) /*FIXME, the reflection API doesn't
offer a way around this*/ 

                return InflateType (type.GetElementType ()).MakeArrayType
(1);

 

It should not be EndsWith ("[*]") but EndsWith ("[*]",
StringComparison.Ordinal)

Otherwise it may fail on certain locales (besides being much more memory
intensive and much slower).

 

Greetings

Andreas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090817/88cc75fd/attachment.html 


More information about the Mono-devel-list mailing list