If the string will always be an address like the example you gave then you just need to get the indexes of the common factor locations, Namely the last index of "\" and the last index of "." and use that index data to extract your substring.
If you are always working with a path and want the filename without the extension you can use System.IO.Path.GetFileNameWithoutExtension as documented on MSDN here.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.