I have a VB file that imports System.IO, but only uses it is a couple of places. My co-workers and I were wondering if there is a small performance boost if we just use System.IO explicitly were we need it (IE., System.IO.MemoryStream) instead of importing it.
Share
No. There’s no difference. The compiler produces exactly the same IL in either case.
You can prove it by compiling it both ways, and then using Reflector to disassemble the assembly and observe the IL produced.