[Mono-winforms-list] how to open file

Stifu stifu at free.fr
Fri Dec 10 07:42:33 EST 2010


Is there even a C drive on Mac in the first place?
And can't you use a relative path, rather than an absolute one?

Also, use Path.DirectorySeparatorChar, rather than hard-coding Windows
separators (ie: avoid "foo\\bar" or @"foo\bar"). Do it like this:
string myPath = "myFolder" + Path.DirectorySeparatorChar + "myFile.ext";

But couldn't you simply put your help.pdf file in the same folder as your
application, so you don't even have to worry about directory separators? Or
in a sub folder there?

Anubhava Dimri wrote:
> Hello Everybody,
> I have generate the problem while open File in MAC. it works successfully
> in windows.
> System.Diagnostics.Process.Start("C:\\help.pdf" );

View this message in context: http://mono.1490590.n4.nabble.com/how-to-open-file-tp3081832p3081880.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.

More information about the Mono-winforms-list mailing list