why is File.Exists() so slow...?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm developing a .Net app on a Pocket PC and my app has access to several
thousand files and I wanted to test file existance before passing onto a DLL,
but it seems really slow to check file existance - anyone any ideas why or a
faster .Net-based solution to do the same thing?
Thanks
 
Is it checking for just one file, or numerous files?
If latter, speed it up by loading all file names using Directory.GetFiles()
and iterationg through them in memory.
 
Thanks Alex, does the trick

Alex Feinman said:
Is it checking for just one file, or numerous files?
If latter, speed it up by loading all file names using Directory.GetFiles()
and iterationg through them in memory.
 
Back
Top