C# 打开文件/跳转链接
生活随笔
收集整理的這篇文章主要介紹了
C# 打开文件/跳转链接
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
mark一下~
打開文件
1.打開文件夾:
System.Diagnostics.Process.Start(FolderPath);-- 打開文件夾 System.Diagnostics.Process.Start(FolderPath+"/"+FileName); -- 打開文件夾中某個文件2.用IE打開文件:
System.Diagnostics.Process.Start("Explorer",FolderPath+"\\"+FileName);--"Explorer.exe",.exe可以省略
3.打開文件夾并選中單個文件:
System.Diagnostics.Process.Start("Explorer", "/select,"+ FolderPath+"\\"+FileName);注:“/select”參數后面有逗號。
跳轉鏈接
- Process.Start(url); -- 默認瀏覽器
- Process.Start("iexplore.exe", url);--IE瀏覽器
轉載于:https://www.cnblogs.com/kybs0/p/11517524.html
總結
以上是生活随笔為你收集整理的C# 打开文件/跳转链接的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 直接连接另一个网站
- 下一篇: 转:C# 线程同步技术 Monito