[Mono-devel-list] Re: Determine the name and/or kind of CLI runtime environment
kornelpal at hotmail.com
Mon May 30 17:54:16 EDT 2005
>From: "Rodrigo B. de Oliveira"
>> My only problem is "Mono.Runtime" is seems not to been always there.
>> Could anyone suggest a better class name in mscorlib.dll?
>I use Mono.Type but I'm not sure about its availability on earlier
I was looking for Mono.Type but the I realized it is System.MonoType.
It seems to been there from the beginning, it is Mono specific (in the name
as well), internal, is inside mscorlib.dll, so it is good.
Thanks for the class.:)
Proposal to make this Mono detection method official:
What about documenting that using the boolean expression
(typeof(object).Assembly.GetType("System.MonoType") != null) is the
recommented way to detect Mono?
In this case it should be documented that this sould be used only to display
the name of the runtime, if necessary runtime specific codes should be based
on the existance of classes or not thrown exceptions.
And it should be documented in MonoType.cs as well that this class should
not be removed as it is used to detect Mono.
More information about the Mono-devel-list