C#打开外部文件,如txt资料

C#打开外部文件,如txt文件string filePath @d:\test.txtif (filePath.Equals()) {MessageBox.Show(

C#打开外部文件,如txt文件

string filePath = @"d:\test.txt";   if (filePath.Equals("")) {   MessageBox.Show("路径不能为空!","操作提示");   return;   }   //先判断文件是否存在,不存在则提示   if (!System.IO.File.Exists(filePath)) {   MessageBox.Show("指定文件不存在!","操作提示");   return;   }   //存在则打开   System.Diagnostics.Process.Start("explorer.exe",filePath);

?