[Mono-devel-list] Differences between Mono and MS CLR
mono at evain.net
mono at evain.net
Wed Aug 4 07:54:30 EDT 2004
Hi there,
As the author of an AOP tool, I'm strongly interested in Reflection and IL.
I've founded 2 "problems" where Mono behaves differently than MS CLR.
The interesting thing is that I think that Mono behaviour is much more
logical than MS CLR. You can find my two thought (in my bad english) here :
http://blogs.labo-dotnet.com/colophon/archive/2004/07/23/3412.aspx
http://blogs.labo-dotnet.com/colophon/archive/2004/07/24/3414.aspx
To sum up, the first one concerns the UnderlyingSystemType from Type that
Mono set well, but MS does not, so we can not access the underlying system
type of an enum or an array using the property, but only using the static
method from Enum for example. I don't think MS behaviour is good, but I've
contacted some Microsoft folks, and they say that it's a "very confusing
area", and that "Mono is incorrectly behaving here". But their
UnderlyingSystemType property seems useless in this case !!!
The second point concerns static field initialization in IL :
.field public static valuetype Test.AnEnumeration anenum = int32(2)
With Mono, we can read it as AnEnumeration.B (that is 2), and there is no
problem. With MS, it's never initialized, and always 0. I do think here that
Mono behaves correctly, but once again, MS does not.
May some guru enlights me and tell me their opinions about this two points ?
Thanks,
Evain Jb
More information about the Mono-devel-list
mailing list