[Mono-list] Determining the platform at compile and run time

Fergus Henderson fjh@cs.mu.OZ.AU
Fri, 31 Oct 2003 12:31:43 +1100


On 30-Oct-2003, A Rafael D Teixeira <rafaelteixeirabr@hotmail.com> wrote:
> Here is a small twist, save it as Mono.Environment.cs and compile as a 
> library to use or as an executable to just test:
> 
> -------
> // How can I tell dynamically what platform my code is running on?
> //
> // This is one possible approach, contributed by Aleksey Demakov 
> (avd@openlinksw.com)
> // And encapsulated by Rafael Teixeira (rafaelteixeirabr@hotmail.com)

That code does the wrong thing when running under Rotor or DotGNU.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.