Check out example codes for "get filename from path c#". It will help you in understanding the concepts better.

Code Example 1

Input : 

string strPath = "c://myfiles//ref//file1.txt";

//function call to get the filename
filename = Path.GetFileName(strPath);

Output :

file1.txt

Learn ReactJs, React Native from akashmittal.com