FileStream.Read 的 offset 参数是否从零开始?

发布于 2024-09-20 00:24:35 字数 62 浏览 1 评论 0原文

FileStream.Read 方法的第二个参数称为 offset,但它是像索引一样从零开始还是从 1 开始?

The second parameter of the FileStream.Read method is called offset but is it zero-based like an index or does it start from one?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心的憧憬 2024-09-27 00:24:35

它从零开始,表示流的开始。引用自文档

偏移量


缓冲区中从零开始的字节偏移量
从哪个开始存储读取的数据
从当前流。从当前流。

It starts from zero indicating the beginning of the stream. Quote from the documentation:

offset

The
zero-based byte offset in buffer at
which to begin storing the data read
from the current stream.from the current stream.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文