System.Diagnostics.Process.Start("https://www.youtube.com/"); 我是初學者,所以我對 Visual Studio 和 C# Error Message Here了解不多。
uj5u.com熱心網友回復:
Process.Start 用于運行可執行代碼,因此您需要將其傳遞給可執行檔案。例如:
// the @ escapes the backslash characters in the path to the Chrome executable
Process.Start(@"C:\Program Files\Google\Chrome\chrome.exe", "http://www.youtube.com");
根據您的系統上安裝 Chrome 的方式(或是否),您甚至可以運行:
Process.Start("chrome.exe", "http://www.youtube.com");
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/419872.html
標籤:
上一篇:為什么在使用Prepare()方法時會出現語法錯誤?沒有“addCustCmd.Prepare();”,問題就消失了
