if everything could be so easy like a DirectorySeparatorChar...

somebody else gave me a link to this one. works fine too!

           int p = (int) Environment.OSVersion.Platform;
if ((p == 4) || (p == 128))
           {
               Console.WriteLine ("Running on Unix");
           }
           else
           {
               Console.WriteLine ("NOT running on Unix");
           }

thanks for the tips.

Hi,

try using

Path.DirectorySeparatorChar

Will return "/" running on Linux and "\" runnging on Windows :-)

HTH
Jan Waiz

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von InTheMood
Gesendet: Sonntag, 13. November 2005 18:23
An: [email protected]
Betreff: [Mono-list] Linux or Windows?

hello,

how to detect if the app is running on Linux or Win?

i'm pretty new to all this linux stuff.

cheers
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list



_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to