Take a look to System.Environment.OSVersion.Platform to see on which platform you are.
-Jochen


-----Urspr�ngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Malcolm Parsons
Gesendet: Freitag, 23. Juli 2004 22:48
An: Daniel Carrera
Cc: Mono List
Betreff: Re: [Mono-list] [Q] cross-platform paths.

On Fri, Jul 23, 2004 at 01:36:45PM -0400, Daniel Carrera wrote:
>  * To specify a full path I need to identify the OS.  Something like:
>    if (WINDOWS)
>    {
>       path = "C:\\temp\myfile";
>    }
>    elsif (LINUX || UNIX)
>    {
>       path = "/tmp/myfile";
>    }

Why not use GetTempPath() or GetTempFileName() from System.IO.Path?

--
Malcolm Parsons
_______________________________________________
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