开发者

how to get ID from file

开发者 https://www.devze.com 2023-01-08 17:57 出处:网络
ho开发者_C百科w to get 3 from 3.hpdf if it is a big int then how can i get itThere is a function for that:

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);
0

精彩评论

暂无评论...
验证码 换一张
取 消