What I have is a giant text file that contains a bunch of strings that are split by \\. The problem for me is there can be 5 \\ or 4 \\ o
\\
string last = inputString.Substring(inputString.LastIndexOf('\\') + 1);
string myString = inputString.Split('\\').Last();
Almost forgot this one (although it's a bit cheeky):
string result = Path.GetFilename(input);