[Mono-dev] How To know in runtime inside a C# program
Rolf Bjarne Kvinge
rolflists at ya.com
Thu Jul 26 04:42:35 EDT 2007
> -----Original Message-----
> From: mono-devel-list-bounces at lists.ximian.com [mailto:mono-devel-list-
> bounces at lists.ximian.com] On Behalf Of josepascual
> Sent: jueves, 26 de julio de 2007 10:30
> To: 'Mono devel list'
> Subject: [Mono-dev] How To know in runtime inside a C# program
>
> Hi Everyone,
>
> I'm doing a program in C# using mono. I want to run it in win32 and
> linux. I
> have a problem with '/' and '\' for directory
> in win32 and linux.
>
> How Can I know in runtime if I'm in linux (unix) or in Windows to
> choose '\'
> for windows and '/' for linux in path for files?
>
Use System.IO.Path.DirectorySeparatorChar.
See:
http://msdn2.microsoft.com/en-us/library/system.io.path.directoryseparatorch
ar(vs.80).aspx
Rolf
> thank you,
>
> Jose Pascual
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.10.19/918 - Release Date:
> 25/07/2007 14:55
More information about the Mono-devel-list
mailing list