[Mono-dev] How To know in runtime inside a C# program

Cetin Sert cetin.sert at gmail.com
Thu Jul 26 05:06:01 EDT 2007


Hi Jose,

You could use

System.IO.Path.DirectorySeparatorChar

which returns the appropriate character for your platform.

Best Regards,
Cetin Sert
http://tenkatext.sourceforge.net

On 26/07/07, josepascual <josepascual at almudi.com> wrote:
>
> 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?
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070726/6497c6d5/attachment.html 


More information about the Mono-devel-list mailing list