得到文件名
1 string fileName = ofd.SafeFileName;
得到路径
1 string filePath = System.IO.Path.GetDirectoryName(ofd.FileName);
获取OpenFileDialog的文件名和文件路径
原文:http://www.cnblogs.com/wangzianan/p/4109936.html