System.IO.Path.GetFileName(openFileDialog1.FileName);//得到文件名
System.IO.Path.GetDirectoryName(openFileDialog1.FileName);//得到路径
System.IO.Path.GetFileName(openFileDialog1.FileName);//得到文件名
System.IO.Path.GetDirectoryName(openFileDialog1.FileName);//得到路径
转载于:https://www.cnblogs.com/butterfly/archive/2009/01/09/1372632.html