C#中OpenFileDialog获取文件名和文件路径的常用方法.
System.IO.Path.GetFullPath(openFileDialog1.FileName); //绝对路径System.IO.Path.GetExtension(openFileDialog1.FileName); //文件扩展名System.IO