System.Diagnostics.Process.Start("https://www.youtube.com/"); I am a beginner so I dont know much about visual studio and C# Error Message Here.
CodePudding user response:
Process.Start is used to run executable code, so you need to pass it an executable. For example:
// 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");
Depending on how (or if) Chrome is installed on your system, you may even be able to just run:
Process.Start("chrome.exe", "http://www.youtube.com");
