[Mono-list] Unable to get environment variable

Jason Perkins starkos at gmail.com
Thu Mar 8 21:33:39 EST 2007


I'm new to non-MS platforms, so my apologies if this isn't a mono
specific question.

I've got mono running on my new OS X box. I am trying to add some code
to my application to detect the platform. I thought it would be as
easy as calling Environment.GetEnvironmentVariable("OSTYPE") and
parsing the result, but the call always returns null, even though
typing `echo $OSTYPE` at a shell prompt returns `darwin8.0`.

Any idea what I'm doing wrong here? Many thanks!

Jason


More information about the Mono-list mailing list