|
-
July 16th, 2009, 01:59 PM
#5
Re: Cutting String
 Originally Posted by Shuja Ali
All he needs is the file name to be returned from the full path. How about trying Path.GetFileName() method? Something like this
Code:
string FileName = Path.GetFileName(@"C:\WithCreationFilter_CS\bin\Debug\hello.dll" );
This is the way to go as it also checks for invalid characters and other edge cases.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|