System.IO.Path.GetFullPath(openFileDialog1.FileName);//绝对路径

System.IO.Path.GetExtension(openFileDialog1.FileName); //文件扩展名

System.IO.Path.GetFileNameWithoutExtension(openFileDialog1.FileName);//文件名没有扩展名

System.IO.Path.GetFileName(openFileDialog1.FileName);//得到文件

System.IO.Path.GetDirectoryName(openFileDialog1.FileName);//得到路径

posted on 2016-11-25 14:29  ppqchina  阅读(153)  评论(0编辑  收藏  举报