int start=str.LastIndexOf("\");
fileName=str.SubString(start+1,str.Length-start-1);
int start=str.LastIndexOf("/");
fileName=str.SubString(start+1,str.length-start-1);
int start=str.LastIndexOf("//");
fileName=str.SubString(start+2,str.length-start-2);
Note:
1. "\" or "/" is same , because "\"=""
2. in function " substring(first,second)" --------first+second==str.length