2013年1月1日 星期二

[C#]Get the file name from file path

We can use OpenFileDialog.FileName to get file path easily.

But,how can we do to get the file name?

There is a good function to do this work.
String fileName = Path.GetFileNameWithoutExtension(SourceFilename);