I'm no expert here, but since when is a backslash a valid path separator on 
Unix?
MS says "AltDirectorySeparatorChar and DirectorySeparatorChar are both valid 
for separating directory levels in a path string."
That means both have to be '/' for Unix. Windows does support both '\\' and 
'/', so their settings make sense.

Peter


-----Original Message-----
From: "Joshua Gage" <[EMAIL PROTECTED]>
To: <[email protected]>
Date: 03 November, 2005 19:06
Subject: [Mono-list] Path.AltDirectorySeparatorChar - why is this a 
forwardslash?


>Hi all,
>
>I'm porting an app from Windows .NET to Linux/Mono and I've just run
>across some curious behavior.
>
>We make heavy use of the Path class, DirectorySeparatorChar and
>AltDirectorySeparatorChar fields.
>
>On Windows/.Net:
>SepChar: '\'        -- as expected
>AltSepChar: '/'   -- as expected
>
>On Linux/Mono:
>SepChar: '/'     -- as expected
>AltSepChar: '/'    -- not expected
>
>In the MSDN doc it says for AltDirectorySeparatorChar the value is a
>backslash '\' on Unix systems
>In the Mono doc is says for AltDirectorySeparatorChar the value is a
>forward slash '/' on Unix Systems
>
>I'm curious why the Mono project choose to make both fields the same
>value. To me this is unexpected; it seems the whole point of having a
>alternate character is to handle converting between the two types of
>slashes when going from one system to another.
>
>Can anyone enlighten me on why it is this way?
>
>Thanks,
>- Josh
>
>_______________________________________________
>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