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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top