[ Home | Forums | About | Sponsors ]
  Welcome, Guest. Please Login or Register
Google
 
Web gotmono.com
  Web Design donated by IdeaZone.ca
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
(Read 187 times)
Revision17
Guest




Best way to detect slash type (and other issues)?
Feb 21st, 2005, 4:20pm
 
I'm writing a small C#/GTK# program that I want to run on Windows with MS.NET and *nix with Mono (hopefully with the same binary).  The program needs to know the slash type being used on the OS and I was wondering if there's a way to do that, other than looking for "Windows" or "UNIX" strings somewhere.

Also, it's going to have a systray icon and I want to be able to know whether to call the X or windows systray code (by detecting whether I'm using X or Windows' GUI).
Back to top
 
 
IP Logged
 
K.R
YaBB Newbies
*
Offline

impersonal text
Posts: 2

Gender: male
Re: Best way to detect slash type (and other issue
Reply #1 - Feb 22nd, 2005, 10:48am
 
The platform specific directory separator character is System.IO.Path.DirectorySeparatorChar. (You might find the other stuff in System.IO.Path class usefull too).

I don't know about the systray icons.

K.R
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print
 

Copyright © 2003-2008, The Mono Community
Website Design donated by IdeaZone.ca