Tuesday, July 17, 2012
Get File Name from path string
5:25 PM |
Posted by
Sheen |
Edit Post
I have seen many young developers are struggle with getting
the only the file name from the full path.
Here is a simple code snippet to get the file name.
string path = "C:\\TEMP\\temp.bmp";
string fileName = System.IO.Path.GetFileName(path);
Happy coding.
the only the file name from the full path.
Here is a simple code snippet to get the file name.
string path = "C:\\TEMP\\temp.bmp";
string fileName = System.IO.Path.GetFileName(path);
Happy coding.
Subscribe to:
Post Comments (Atom)
Blog Archive
Important Blogs
-
-
BDD with Rails and Cucumber10 years ago
-
-
Watch Live Cricket Online Free14 years ago
-
BBC and Mahinda Rajapakshe15 years ago
-
-
0 comments:
Post a Comment