tags:

views:

26

answers:

2

how to get 3 from 3.hpdf

if it is a big int then how can i get it

+2  A: 

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

Henk Holterman
Filenames are strings too. And the `int id = ...` part is optional. Note that you will get better answers if you put a little more effort (and information) in your questions. I'm still not certain what you actually need.
Henk Holterman
+1  A: 

I think this will be helpful.

System.IO.Path.GetFileNameWithoutExtension(filename);
Krunal