[Mono-list] directory path separator

A Rafael D Teixeira rafael.teixeirabr@terra.com.br
Fri, 17 Sep 2004 09:40:48 -0300


On Thu, 2004-09-16 at 11:02, Malcolm Parsons wrote: 
> On Thu, 16 Sep 2004 07:50:56 -0600, Kevin White <jedirunner@gmail.com> wrote:
> 
> > I'd like my code to be portable between windows and linux using .Net
> > and mono.    I take one of the "special" folders from
> > Environment.GetFolder(), and append some directory structure to that
> > to do some work.  How do I know what folder separator to use?
> 
> System.IO.Path.DirectorySeparatorChar

Better yet use the Path class static Combine method to compose paths
from parts. See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemiopathclasscombinetopic.asp


-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/