PC Review


Reply
Thread Tools Rate Thread

Binary File Reading Question

 
 
PJ Olson
Guest
Posts: n/a
 
      7th Jan 2005
All, is there a speed or efficiency difference in using FileStream.Position
vs. FileStream.Seek to navigate through a file?


 
Reply With Quote
 
 
 
 
William Stacey [MVP]
Guest
Posts: n/a
 
      7th Jan 2005
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.

--
William Stacey, MVP
http://mvp.support.microsoft.com

"PJ Olson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> All, is there a speed or efficiency difference in using

FileStream.Position
> vs. FileStream.Seek to navigate through a file?
>
>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA, Reading File As Binary Petr Bazant Microsoft Excel Programming 4 20th Jan 2007 10:36 AM
Question Reading Text/Binary File Smoke Microsoft VB .NET 0 6th Jan 2007 11:29 PM
Reading a binary file =?Utf-8?B?Uk1M?= Microsoft VB .NET 2 8th May 2006 06:01 PM
Reading binary file Maxi Microsoft Excel Programming 3 15th Apr 2006 12:15 AM
Reading binary file Dave Microsoft VC .NET 1 2nd Feb 2004 04:06 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:45 AM.