views:

227

answers:

2

I typically develop in C# and am quite accustom to using System.IO. I recently ran across the FileIO library and have found that some of the advantages (such as sending an item to the recycle bin) are quite nice to have. Especially in the program I am currently working on. My question is, Does System.IO out perform the VisualBasic.FileIO??

My program I am writing will be copying literally TB's worth of information onto server towers. I want to make sure I do not lose any time due to the library I am using.

Thank you in advance!!!

+5  A: 

Microsoft.VisualBasic.FileIO is built on top of System.IO (for the most part.) It should be at most as fast as System.IO for things that have direct equivalent there. The performance difference should be negligible anyway. Nothing prevents you from using both. If there's a function you need that exists in VisualBasic.FileIO and doesn't exist in System.IO, you should be using the VisualBasic.FileIO version rather than rolling your own.

Mehrdad Afshari
Which is built ontop of win32
Will
Good follow up edit Mehrdad! :)
klabranche
Thank you Mehrdad! That's what I was hoping, even though a lot of C# people don't like to use the Microsoft.VisualBasic library, it has some handy methods in it I'd rather not re-write! Thank you again!
jsmith
No problem. That's a stupid religious issue. Stay away from them. A wise person uses his brain rather than blindly believing religious stuff :)
Mehrdad Afshari
A: 

It is built on top of System.IO as Mehrdad mentioned but it does do a lot for you and may not be much slower. Do some perf tests between the two and see if the results are that telling that it would warrant using System.IO directly which would mean rolling your own code instead.

You may find the perf. hit isn't very big at all. :)

klabranche