Wednesday, 28 August 2013

System.IO.Directory.GetFiles VS My.Computer.FileSystem.GetFiles

System.IO.Directory.GetFiles VS My.Computer.FileSystem.GetFiles

I wanted to get the names of all the files in a specific directory which
includes over 25,000 files. I tried using these methods:
System.IO.Directory.GetFiles and My.Computer.FileSystem.GetFiles
I've found out that System.IO is significantly faster My.Computer
By significantly I mean around 20 second faster.
Could anyone explain to me the difference between These two methods?

No comments:

Post a Comment