Some Creativity

Weblog of Siddharth Uppal

Which one is faster - FileStream.Position or FileStream.Seek?

leave a comment »

FileStream.Position property is implemented in terms of File.Seek (essentially File.Seek(value, SeekOrigin.Begin)). Consequently setting the location of the virtual file-pointer by calling Seek directly instead of calling Position results in slightly faster execution speed. Seek is also better because it has more options.

Written by Sid

April 26, 2008 at 9:11 am

Posted in General

Leave a Reply