使用FileInfo类,用路径初始化FileInfo类实例,调用返回FileName属性即可
示例
using System.IO;
String FileName;
openFileDialog1_FileOK(object sender,EventArgs e)
{
FileInfo myFile=new FileInfo(openFileDialog1.FileName);
FileName= myFile.FileName;//myFile.FileName为所需无路径文件名
}