So I do not know if this is possible, but below I have a file path in a variable path:
string path = @"c:\users\povermyer\documents\visual studio 2013\Projects\DanProject\PNRS
\PNRS.log";
What I want to do is I want to have the console window write just the last part in the path. For example, I would like the output of the console window to be:
The name of this file is PNRS.log
Is there a way to do that simply, or am I going to have to do it a long way by using a directory?
Use
Path.GetFileName
method.