开发者

Read binary file from a position in ASP.NET

开发者 https://www.devze.com 2023-03-06 12:50 出处:网络
I want to read a binary file from a particular position. I am u开发者_C百科sing the following code but that is not working.

I want to read a binary file from a particular position. I am u开发者_C百科sing the following code but that is not working.

FileStream fs = new FileStream(filepath, FileMode.Open, FileAccess.Read);
fs.Seek(len,SeekOrigin.Current);
int bytesRead = fs.Read(buf, 0, buf.Length);

It starts reading from beginning.


fs.Seek(len,SeekOrigin.Begin);
0

精彩评论

暂无评论...
验证码 换一张
取 消