System.IO Versus VisualBasic.FileIO

前端 未结 2 2048
旧时难觅i
旧时难觅i 2020-12-21 13:45

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 i

相关标签:
2条回答
  • 2020-12-21 13:52

    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.

    0 讨论(0)
  • 2020-12-21 13:55

    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. :)

    0 讨论(0)
提交回复
热议问题