I would like to return everything to the right of a certain character in a string. Right now i'm using:
int nPos = strFilePath.LastIndexOf("\\");
string filename = strFilePath.Substring(nPos + 1);
which returns a filename (ie. test.txt or test2.doc)
What I'm trying to do is return everything before the "." (ie test or test2)
How do I do this?