
最近群里有一个Q友,问:C#执行外部程序或打开网页呢?方法是这样的:
使用C#的System.Diagnostics.Process.Start 方法就可以实现
例:
System.Diagnostics.Process.Start("notepad.exe");//打开记事本
System.Diagnostics.Process.Start("notepad.exe",filepath);//将filepath路径的文件用记事本打开
例:
System.Diagnostics.Process.Start("IEXPLORE.EXE","http://exfsoft.com");打开一个网站