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

Jackson Harper jackson@ximian.com
Wed, 29 Oct 2003 09:46:02 -0800


On Wed, 2003-10-29 at 09:33, Chris Seaton wrote:
> How do I know what OS my program is running on at run time? PlatformID
> contains no entry for any systems apart from Windows.

http://www.nullenvoid.com/mono/wiki/index.php/DeveloperFaq?PHPSESSID=e94bd373fcad70a585f9bf5bb57ba841


> How about compile time? Is there something I can test for with a #if?

Mcs defines __MonoCS__ by default.

Jackson