Binary File Reading Question

  • Thread starter Thread starter PJ Olson
  • Start date Start date
P

PJ Olson

All, is there a speed or efficiency difference in using FileStream.Position
vs. FileStream.Seek to navigate through a file?
 
By my read, Position properties calls Seek() so the primary diff is the
former is a property and the latter is a method. On paper calling Seek
should be "slightly" faster as you don't call the Position property wrapper
first. Also, I think you end up calling FlushWrite twice if using Position
as it is called in Position and Seek, but have just glanced at the code.
 
Back
Top