how to get ID from file
ho开发者_C百科w to get 3 from 3.hpdf
if it is a big int then how can i get it
There is a function for that:
string name = System.IO.Path.GetFileNameWithoutExtension(fileName);
int id = int.Parse(name);
That only works if your filenames look like 12345.hpdf
I think this will be helpful.
System.IO.Path.GetFileNameWithoutExtension(filename);
精彩评论