0
在運行我的基於控制檯的C#應用程序時,它在位置"../../Template/Output/"
處生成Results.htm
文件,並且在程序結束時我想在瀏覽器中打開Results.htm
文件。打開HTML文件,其相對路徑在瀏覽器中已知,使用C#
目前,Process.Start("http://www.google.com");
正在工作,但是,如何打開文件名和相對路徑已知的文件?
我應該不知何故獲得Results.htm
文件的完整路徑並使用它?
如果是,我該怎麼做?
任何指針都會有所幫助。
爲什麼不'的Process.Start(」 .. \ .. \模板\輸出\ Results.htm「)'工作? – Brad
您是否嘗試過Process.Start(「../../ Template/Output/Results.htm」)?它可能不是生產用途最好的。 – Decker97
我把它放在一個變量字符串outPut =「.. \ .. \ Template \ Output \ Results.htm」中,我使用了Process.Start(outPut),它不能確定這是否正確。 –