I'm assuming:
String abc = "My Documents/FileName.txt".Split('/')[1]; // is not the quickest way
Is it?
I'm assuming:
String abc = "My Documents/FileName.txt".Split('/')[1]; // is not the quickest way
Is it?
String abc = "My Documents/FileName.txt";
abc = abc.Substring(abc.LastIndexOf('/') + 1);
This has the following virtues: